From 94166682eed2a49038d9bdc1515e0b2f0630ab20 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 14 Feb 2012 08:32:34 -0800 Subject: Made speclib less of a maintenance headache. Now it copies in the current versions of BoxesRunTime and ScalaRunTime and applies patches to them, and the whole build is automated. # This is the only thing I actually typed, the rest is fancy echo. $ test/instrumented/mkinstrumented.sh build % rm -rf /scratch/trunk1/test/instrumented/classes % cp /scratch/trunk1/test/instrumented/../../src/library/scala/runtime/BoxesRunTime.java /scratch/trunk1/test/instrumented/../../src/library/scala/runtime/ScalaRunTime.scala /scratch/trunk1/test/instrumented/library/scala/runtime % patch BoxesRunTime.java /scratch/trunk1/test/instrumented/boxes.patch patching file BoxesRunTime.java % patch ScalaRunTime.scala /scratch/trunk1/test/instrumented/srt.patch patching file ScalaRunTime.scala Hunk #3 succeeded at 63 (offset 23 lines). Hunk #4 succeeded at 78 (offset 23 lines). Hunk #5 succeeded at 81 (offset 23 lines). Hunk #6 succeeded at 96 (offset 23 lines). % /scratch/trunk1/test/instrumented/../../build/pack/bin/scalac -d /scratch/trunk1/test/instrumented/classes /scratch/trunk1/test/instrumented/library/scala/runtime/BoxesRunTime.java /scratch/trunk1/test/instrumented/library/scala/runtime/ScalaRunTime.scala % javac -cp /scratch/trunk1/test/instrumented/../../build/pack/lib/scala-library.jar -d /scratch/trunk1/test/instrumented/classes /scratch/trunk1/test/instrumented/library/scala/runtime/BoxesRunTime.java % cd /scratch/trunk1/test/instrumented/classes % jar cf instrumented.jar . % mv -f instrumented.jar /scratch/trunk1/test/instrumented/../../test/files/speclib /scratch/trunk1/test/files/speclib/instrumented.jar has been created. --- test/instrumented/mkinstrumented | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100755 test/instrumented/mkinstrumented (limited to 'test/instrumented/mkinstrumented') diff --git a/test/instrumented/mkinstrumented b/test/instrumented/mkinstrumented deleted file mode 100755 index a87e8cb94f..0000000000 --- a/test/instrumented/mkinstrumented +++ /dev/null @@ -1,46 +0,0 @@ -# -# -# Used to compile a jar with instrumented versions of certain classes. -# - - - - -if [ $# -ne 1 ] -then - echo "Must provide build dir ('target' or 'build')." - exit 1 -fi - - -BUILDDIR=$1 -TOPDIR=../.. -SCALAC=$TOPDIR/$BUILDDIR/pack/bin/scalac -SRC_DIR=library/ -SCALALIB=$TOPDIR/$BUILDDIR/pack/lib/scala-library.jar -CLASSDIR=classes/ -ARTIFACT=instrumented.jar - - -# compile it -rm -rf $CLASSDIR -mkdir $CLASSDIR -JSOURCES=`find $SRC_DIR -name "*.java" -print` -SOURCES=`find $SRC_DIR \( -name "*.scala" -o -name "*.java" \) -print` -echo $SOURCES -$SCALAC -d $CLASSDIR $SOURCES -javac -cp $SCALALIB -d $CLASSDIR $JSOURCES - - -# jar it up -rm $ARTIFACT -cd $CLASSDIR -jar cf $ARTIFACT . -mv $ARTIFACT ../ -cd .. - - - - - - -- cgit v1.2.3