gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master d99155d8: developer-build: add the --confopts


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master d99155d8: developer-build: add the --confopts option
Date: Fri, 2 Dec 2022 21:29:51 -0500 (EST)

branch: master
commit d99155d870b7001c60f8403f115ef07b87ff9134
Author: Pedram Ashofteh-Ardakani <pedramardakani@pm.me>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    developer-build: add the --confopts option
    
    Until now, one could not set the 'configure' options while calling the
    'developer-build' script. For example, one might not need to build a
    specific feature, like those that are related to 'python'. Normally the
    caller could use './configure --without-python' to achieve this. However,
    there was no way of doing that while using the 'developer-build' script.
    
    With this commit, the '--confopts' option is added to the 'developer-build'
    script which takes a string sandwiched between double quotations so that
    the 'configure' options would not get mixed up with the 'developer-build'
    options. For instance, now one could install gnuastro while excluding
    programs that need python like this:
    
        ./developer-build --confopts "--without-python" -I
---
 developer-build | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/developer-build b/developer-build
index e4a665b2..2373e79f 100755
--- a/developer-build
+++ b/developer-build
@@ -161,6 +161,12 @@ Options:
  -o, --prefix STR         Install architecture-independent files here.
                           Current value: $prefix
 
+     --confopts "STR"     Add extra configure options manually.
+                          Please note that all of the options must
+                          be wrapped between double quotations '"',
+                          so that the script does not confuse them
+                          with 'developer-build' options.
+
  -V, --version            Print current version to be used in absolute
                           build directory name.
                           Current value: $version
@@ -228,6 +234,15 @@ while [[ $# -gt 0 ]]
 do
     key="$1"
     case $key in
+        --confopts)
+            confopts="$2"
+            if [ x"$confopts" = x ]; then
+                echo "No argument given to '--confopts'."
+                exit 1;
+            fi
+            shift # past argument
+            shift # past value
+            ;;
         -o|--prefix)
             prefix="$2"
             if [ x"$prefix" = x ]; then
@@ -483,10 +498,10 @@ if [ ! -f Makefile ]; then
 
     # Set the proper flags.
     if [ x$debug = x1 ]; then
-        confopts="--enable-debug"
+        confopts="$confopts --enable-debug"
     fi
     if [ x$valgrind = x1 ]; then
-        confopts="--enable-check-with-valgrind"
+        confopts="$confopts --enable-check-with-valgrind"
     fi
 
     # Run the configure script.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]