[gimp-help-2] autogen: honor the environment variable NOCONFIGURE.



commit 2eacd91734e5ab333cb3d9f306a8f9a2dcdf804c
Author: Jehan <jehan girinstud io>
Date:   Sun Jun 11 18:05:50 2017 +0200

    autogen: honor the environment variable NOCONFIGURE.
    
    This is a very common environment variable, nearly a standard since it
    is cited in the "Build API" (followed by Flatpak for instance). GIMP
    codebase have already honored this variable for some time now.
    There are many cases when you don't want to run configure, in particular
    when you just want to generate the configure file for a tarball, or
    again when you want to do a VPATH build.

 autogen.sh |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index c67298c..69572e2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -58,17 +58,19 @@ test $TEST_TYPE $FILE || {
 }
 
 
-echo
-echo "I am going to run ./configure with the following arguments:"
-echo
-echo "  --enable-maintainer-mode --enable-build $AUTOGEN_CONFIGURE_ARGS $@"
-echo
-
-if test -z "$*"; then
-    echo "If you wish to pass additional arguments, please specify them "
-    echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
-    echo "environment variable."
-    echo
+if test -z "$NOCONFIGURE"; then
+  echo
+  echo "I am going to run ./configure with the following arguments:"
+  echo
+  echo "  --enable-maintainer-mode --enable-build $AUTOGEN_CONFIGURE_ARGS $@"
+  echo
+
+  if test -z "$*"; then
+      echo "If you wish to pass additional arguments, please specify them "
+      echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
+      echo "environment variable."
+      echo
+  fi
 fi
 
 if test -z "$ACLOCAL_FLAGS"; then
@@ -114,11 +116,13 @@ rm -rf autom4te.cache
 
 cd $ORIGDIR
 
-if $srcdir/configure --enable-maintainer-mode "$@"; then
-  echo
-  echo "Now type 'make' to compile $PROJECT."
-else
-  echo
-  echo "Configure failed or did not finish!"
-  exit 1
+if test -z "$NOCONFIGURE"; then
+  if $srcdir/configure --enable-maintainer-mode "$@"; then
+    echo
+    echo "Now type 'make' to compile $PROJECT."
+  else
+    echo
+    echo "Configure failed or did not finish!"
+    exit 1
+  fi
 fi


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