Math classlibrary
[IRC.git] / Robust / src / buildscript
index fc3fdfb0ed864f675f3456cb6ffff753afad0c27..fde52d795c08d0099722c9024f987a19950731b9 100755 (executable)
@@ -22,6 +22,7 @@ echo -mainclass class with main method
 echo -o binary
 echo -instructionfailures inject code for instructionfailures
 echo -profile build with profile options
+echo "-enable-assertions execute assert statements during compilation"
 echo -help help
 }
 
@@ -38,6 +39,7 @@ SPECDIR=`pwd`
 SRCFILES=''
 EXTRAOPTIONS=''
 MAINFILE='a'
+JAVAFORWARDOPTS=''
 JAVAOPTS=''
 OPTIONALFLAG=false
 
@@ -102,6 +104,9 @@ elif [[ $1 = '-check' ]]
 then
 CHECKFLAG=true
 JAVAOPTS="$JAVAOPTS -conscheck"
+elif [[ $1 = '-enable-assertions' ]]
+then
+JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
 elif [[ $1 = '-specdir' ]]
 then
 cd $2
@@ -150,9 +155,11 @@ fi
 
 # Build bristlecone/java sources
 
-java -cp $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
+if ! java $JAVAFORWARDOPTS -cp $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
 $ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR -precise \
 $JAVAOPTS $SRCFILES
+then exit $?
+fi
 
 # Build all of the consistency specs