check errors when building bigemulator with --with-production, and without --enable...
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 20:24:17 +0000 (15:24 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 13 Apr 2010 20:24:17 +0000 (15:24 -0500)
build

diff --git a/build b/build
index 052f5d3d3e1bcdf192c31c2e12b3415a24b05365..083a97a90018d0a2dd267f9b31966ce56ace56ef 100755 (executable)
--- a/build
+++ b/build
@@ -335,6 +335,15 @@ do
                QUIET="--quiet"
                shift;
                ;;
+    --enable-tracing|--enable-tracing=*)
+               CONFIG_OPTS="$CONFIG_OPTS $1"
+               ENABLE_TRACING=yes
+               shift
+               ;;
+    --enable-*)
+               CONFIG_OPTS="$CONFIG_OPTS $1"
+               shift
+               ;;
     -j*)
                 PMAKENUM=`echo $1 | awk -Fj '{print $2}'`
                MAKEOPTS="$MAKEOPTS -j $PMAKENUM"
@@ -368,6 +377,7 @@ do
           TestIfOption $1
           BOPTS="$BOPTS $1"
           [ $1 =  "bigemulator" ] && BUILD_EMULATOR=1
+          [ $1 =  "bigsim" ] && BUILD_EMULATOR=1
         fi
         shift
        ;;
@@ -376,6 +386,12 @@ done
 
 [ "x$VERSION" = "x" ] && syntax && exit 1
 
+if test -n "$WITH_PRODUCTION" -a $BUILD_EMULATOR -eq 1 -a -z "$ENABLE_TRACING"
+then
+  echo "Error: bigemulator requires tracing modules, --with-production must be used with --enable-tracing"
+  exit 1
+fi
+
 if [ -z "$MAKE" ] 
 then
   # prefer gmake
@@ -532,7 +548,7 @@ then
     echo '#define CMK_REPLAYSYSTEM  0' >> $ConvHeader
     # Prepend optimize so that an explicit -no-optimize still works
     OPTS="-optimize $OPTS"
-    CONFIG_OPTS="$CONFIG_OPTS --disable-tracing"
+    CONFIG_OPTS="--disable-tracing $CONFIG_OPTS"
 fi
 
 # build with Tau