summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xant-build-nsc.sh42
-rwxr-xr-xant-test-nsc.sh44
2 files changed, 63 insertions, 23 deletions
diff --git a/ant-build-nsc.sh b/ant-build-nsc.sh
index 0769f443b8..7382b272c7 100755
--- a/ant-build-nsc.sh
+++ b/ant-build-nsc.sh
@@ -1,24 +1,44 @@
-#!/bin/sh
+#!/bin/bash
+########################################################-*-Shell-script-*-####
+# Build nsc
+##############################################################################
+# $Id$
. ant-common.sh
+##############################################################################
# jars for `scalac' task MUST EXIST
-if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi
-if ! addJar $scala_jar scala_jar; then echo "try: make jar target=LIBRARY" && exit -1; fi
-if ! addJar $tools_jar tools_jar; then echo "try: make jar target=TOOLS" && exit -1; fi
+if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi
+if ! addJar $scala_jar scala_jar; then
+ $ECHO "try: make jar target=LIBRARY" && exit -1;
+fi
+if ! addJar $tools_jar tools_jar; then
+ $ECHO "try: make jar target=TOOLS" && exit -1;
+fi
+
+##############################################################################
# jars for `pico' task MUST EXIST including the `-scala-hacks' enabled
-if ! addJar $jaco_jar jaco_jar; then exit -1; fi
-export CLASSPATH
+if ! addJar $jaco_jar jaco_jar; then exit -1; fi
+
+##############################################################################
+# ant build
+
+ANT_CONFIGFILE=build-nsc.xml
+ANT_BUILDFILE=concrete-$ANT_CONFIGFILE
+ANT_EXCLFILE=developer/${USER}/build-nsc-excludes.xml
# for debugging your classpath
#echo $CLASSPATH
-if [ -f developer/${USER}/build-nsc-excludes.xml ]; then
- sed -e "s/userExcludes\ \"\"/userExcludes\ SYSTEM\ \"developer\/${USER}\/build-nsc-excludes.xml\"/" < build-nsc.xml > concrete-build-nsc.xml;
+if [ -f "$ANT_EXCLFILE" ]; then
+ $SED -e "s#userExcludes\ \"\"#userExcludes\ SYSTEM\ \"$ANT_EXCLFILE\"#" \
+ < $ANT_CONFIGFILE > $ANT_BUILDFILE;
else
- ln -s build-nsc.xml concrete-build-nsc.xml;
+ $CP $ANT_CONFIGFILE $ANT_BUILDFILE;
fi
-ant -f concrete-build-nsc.xml $*
-rm -f concrete-build-nsc.xml
+CLASSPATH="$CLASSPATH" $ANT_CMD $ANT_OPTS -f "$ANT_BUILDFILE" $*
+#$RM "$ANT_BUILDFILE"
+
+##############################################################################
diff --git a/ant-test-nsc.sh b/ant-test-nsc.sh
index 93f130ef63..a8c5d8927c 100755
--- a/ant-test-nsc.sh
+++ b/ant-test-nsc.sh
@@ -1,26 +1,46 @@
-#!/bin/sh
+#!/bin/bash
+########################################################-*-Shell-script-*-####
+# Test nsc
+##############################################################################
+# $Id$
. ant-common.sh
+##############################################################################
# jar with fjbg, scala runtime
-if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi
-if ! addJar $tools_jar tools_jar; then exit -1; fi
-if ! addJar $scala_jar scala_jar; then echo "try: make jar target=LIBRARY" && exit -1; fi
+if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi
+if ! addJar $tools_jar tools_jar; then exit -1; fi
+if ! addJar $scala_jar scala_jar; then
+ $ECHO "try: make jar target=LIBRARY" && exit -1;
+fi
+
+##############################################################################
# jars for `nsc' task (once its compiled)
-if ! addJar $jars_dir/nsc4ant.jar "jars_dir containing nsc4ant"; then echo "try 'sh ant-build-nsc.sh build.nsc4'" && exit -1; fi
-if ! addJar $jars_dir/nsc.jar "jars_dir containing nsc.jar"; then echo "try 'sh ant-build-nsc.sh'" && exit -1; fi
-export CLASSPATH
+if [ ! addJar $nsc4ant_jar nsc4ant_jar ]; then
+ $ECHO "try 'sh ant-build-nsc.sh build.nsc4'" && exit -1;
+fi
+if [ ! addJar $nsc_jar nsc_jar ]; then
+ $ECHO "try 'sh ant-build-nsc.sh'" && exit -1;
+fi
+
+##############################################################################
+# ant build
+
+ANT_CONFIGFILE=test-nsc.xml
+ANT_BUILDFILE=concrete-$ANT_CONFIGFILE
+ANT_EXCLFILE=developer/${USER}/test-nsc-excludes.xml
# for debugging your classpath
#echo $CLASSPATH
-if [ -f developer/${USER}/test-nsc-excludes.xml ]; then
- sed -e "s/userExcludes\ \"\"/userExcludes\ SYSTEM\ \"developer\/${USER}\/test-nsc-excludes.xml\"/" < test-nsc.xml > concrete-test-nsc.xml;
+if [ -f "$ANT_EXCLFILE" ]; then
+ $SED -e "s#userExcludes\ \"\"#userExcludes\ SYSTEM\ \"$ANT_EXCLFILE\"#" < $ANT_CONFIGFILE > $ANT_BUILDFILE;
else
- ln -s test-nsc.xml concrete-test-nsc.xml;
+ $CP $ANT_CONFIGFILE $ANT_BUILDFILE;
fi
-ant -f concrete-test-nsc.xml $*
-rm -f concrete-test-ncs.xml
+CLASSPATH="$CLASSPATH" $ANT_CMD $ANT_OPTS -f "$ANT_BUILDFILE" $*
+$RM "$ANT_BUILDFILE"
+##############################################################################