aboutsummaryrefslogtreecommitdiff
path: root/cbt
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-06 23:20:04 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-06 23:20:04 -0500
commit4dae0e69f4b2947942d5ff7d4edee482073ee26b (patch)
tree29f4bbdf8908cd4ea067387c7442c8e8680c3c48 /cbt
parent1f5242bac286d88a7ff9026a785653a3335fc999 (diff)
downloadcbt-4dae0e69f4b2947942d5ff7d4edee482073ee26b.tar.gz
cbt-4dae0e69f4b2947942d5ff7d4edee482073ee26b.tar.bz2
cbt-4dae0e69f4b2947942d5ff7d4edee482073ee26b.zip
hack to retrigger a previously failed compilation to happen again for nailgun launcher and stage1. (zinc is still wasting time trying every single time.)
Diffstat (limited to 'cbt')
-rwxr-xr-xcbt14
1 files changed, 10 insertions, 4 deletions
diff --git a/cbt b/cbt
index d4d51f3..7e721c6 100755
--- a/cbt
+++ b/cbt
@@ -156,11 +156,14 @@ stage1 () {
done
compiles=0
if [ $changed -eq 1 ]; then
- #rm $NAILGUN$TARGET/cbt/*.class 2>/dev/null
+ rm $NAILGUN$TARGET/cbt/*.class 2>/dev/null # defensive delete of potentially broken class files
echo "Compiling cbt/nailgun_launcher" 1>&2
javac -Xlint:deprecation -d $NAILGUN$TARGET `ls $NAILGUN*.java`
compiles=$?
- if [ $compiles -ne 0 ]; then break; fi
+ if [ $compiles -ne 0 ]; then
+ rm $NAILGUN$TARGET/cbt/*.class 2>/dev/null # triggers recompilation next time.
+ break
+ fi
if [ $use_nailgun -eq 0 ]; then
echo "Stopping nailgun" 1>&2
$NG ng-stop >> $nailgun_out 2>> $nailgun_err &
@@ -178,11 +181,14 @@ stage1 () {
compiles2=0
if [ $changed2 -eq 1 ]; then
+ rm $STAGE1$TARGET/cbt/*.class 2>/dev/null # defensive delete of potentially broken class files
echo "Compiling cbt/stage1" 1>&2
- rm $STAGE1$TARGET/cbt/*.class 2>/dev/null
$SCALAC -cp $NAILGUN$TARGET -d $STAGE1$TARGET `ls $STAGE1/*.scala`
compiles2=$?
- if [ $compiles2 -ne 0 ]; then break; fi
+ if [ $compiles2 -ne 0 ]; then
+ rm $STAGE1$TARGET/cbt/*.class 2>/dev/null # triggers recompilation next time.
+ break
+ fi
fi
log "run CBT and loop if desired. This allows recompiling CBT itself as part of compile looping." $*