build: makefile should remember and reuse build options
authorRamprasad Venkataraman <ramv@illinois.edu>
Mon, 27 Aug 2012 05:41:34 +0000 (00:41 -0500)
committerRamprasad Venkataraman <ramv@illinois.edu>
Mon, 27 Aug 2012 06:03:38 +0000 (01:03 -0500)
Its a pain to have to constantly pass OPTS= on the make cmd line
This is not a perfect solution, but it scratches a long-standing itch.

build
src/scripts/Makefile

diff --git a/build b/build
index 84d255b60f582dfe523cd11d6c48a39f33d5ed91..979b68999e004057a17e005067245ac1f609afbe 100755 (executable)
--- a/build
+++ b/build
@@ -639,6 +639,7 @@ Echo "Performing '$MAKE $MAKEOPTS basics OPTS="$OPTS" QUIET="$QUIET" CONFIG_OPTS
 cd $DESTINATION/tmp 
 echo "CONFIG_OPTS=\"$CONFIG_OPTS\"" > config_opts.sh
 chmod +x config_opts.sh
+echo "OPTS += $OPTS" > buildopts.mk
 $MAKE $MAKEOPTS basics OPTS="$OPTS $BUILD_SHARED" QUIET="$QUIET"
 MAKEEXIT=$?
 [ $MAKEEXIT -ne 0 ] && printError
index f51cfc5f804736caaddc222907c06c706b683408..055e6356ac13fd66518ce2d99b09b7ca0758ae17 100644 (file)
@@ -1132,5 +1132,5 @@ dependsCaseSensitive: cidepends
         done;  \
         rm -f metis.h  scotch.h
 
-
-
+# The build script should have spit out the build options into this makefile
+-include buildopts.mk