build: Dont override OPTS set on the cmdline
authorRamprasad Venkataraman <ramv@illinois.edu>
Mon, 27 Aug 2012 14:58:50 +0000 (09:58 -0500)
committerRamprasad Venkataraman <ramv@illinois.edu>
Mon, 27 Aug 2012 14:58:50 +0000 (09:58 -0500)
build
src/scripts/Makefile

diff --git a/build b/build
index 979b68999e004057a17e005067245ac1f609afbe..97e692ddab14927dec5367658e7ce2778fdfc289 100755 (executable)
--- a/build
+++ b/build
@@ -639,7 +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
+echo "OPTSATBUILDTIME += $OPTS" > buildopts.mk
 $MAKE $MAKEOPTS basics OPTS="$OPTS $BUILD_SHARED" QUIET="$QUIET"
 MAKEEXIT=$?
 [ $MAKEEXIT -ne 0 ] && printError
index 055e6356ac13fd66518ce2d99b09b7ca0758ae17..8d08cbaae01894fb925e8129e9cf0b2038aee267 100644 (file)
@@ -1134,3 +1134,9 @@ dependsCaseSensitive: cidepends
 
 # The build script should have spit out the build options into this makefile
 -include buildopts.mk
+# If OPTS was not defined, use the build time options
+OPTS ?= $(OPTSATBUILDTIME)
+ifeq ($(strip $(OPTS)),)
+$(warning Variable OPTS is defined to an empty string. Are you sure this is what you want?)
+endif
+