diff options
-rw-r--r-- | ant-build-nsc.bat | 37 | ||||
-rw-r--r-- | ant-common.bat | 29 | ||||
-rw-r--r-- | ant-test-nsc.bat | 37 | ||||
-rw-r--r-- | setenv-bat.xsl | 15 | ||||
-rw-r--r-- | setenv-nsc.xml | 36 | ||||
-rw-r--r-- | setenv-sh.xsl | 15 |
6 files changed, 169 insertions, 0 deletions
diff --git a/ant-build-nsc.bat b/ant-build-nsc.bat new file mode 100644 index 0000000000..1828a4d745 --- /dev/null +++ b/ant-build-nsc.bat @@ -0,0 +1,37 @@ +@echo off +rem ####################################################-*-Batch-script-*-####
+rem # Build nsc
+rem ##########################################################################
+rem # $Id$
+ +if "%OS%"=="Windows_NT" @setlocal
+ +set _ANTCMD_ARGS=%1
+if ""%1""=="""" goto doneStart
+shift
+:setupArgs
+if ""%1""=="""" goto doneStart
+set _ANTCMD_ARGS=%_ANTCMD_ARGS% %1
+shift
+goto setupArgs
+
+:doneStart +call ant-common.bat
+
+rem ##########################################################################
+rem # ant build
+
+set ANT_CONFIG_BUILDFILE=build-nsc.xml
+set ANT_BUILDFILE=concrete-%ANT_CONFIG_BUILDFILE%
+set ANT_EXCLUDEFILE=developer/%USERNAME%/build-nsc-excludes.xml
+ +%CP% %ANT_CONFIG_BUILDFILE% %ANT_BUILDFILE%
+ +set CLASSPATH=%nsc_fjbg_jar%;%nsc_scala_jar%;%nsc_tools_jar%;%nsc_jaco_jar% +%_ANTCMD% -Dplatform=win -f %ANT_BUILDFILE% %_ANTCMD_ARGS%
+
+%RM% %ANT_BUILDFILE%
+
+rem ##########################################################################
+
+if "%OS%"=="Windows_NT" @endlocal
diff --git a/ant-common.bat b/ant-common.bat new file mode 100644 index 0000000000..1db6f81572 --- /dev/null +++ b/ant-common.bat @@ -0,0 +1,29 @@ +@echo off +rem ####################################################-*-Batch-script-*-####
+rem # Common settings
+rem ##########################################################################
+rem # $Id$
+
+rem ##########################################################################
+rem # Apache Ant
+
+set _ANTCMD=ant
+set ANT_OPTS=-Xmx256M
+rem set ANT_ARGS=-verbose
+ +rem ########################################################################## +rem # Shell commands + +set CP=cp +set ECHO=echo +set RM=del /s /q +
+rem ##########################################################################
+rem # environment setup
+
+echo Setting up the build environment..
+echo. +call %_ANTCMD% -Dplatform=win -q -f setenv-nsc.xml >NUL +call env.bat + +rem ##########################################################################
diff --git a/ant-test-nsc.bat b/ant-test-nsc.bat new file mode 100644 index 0000000000..d6a884e245 --- /dev/null +++ b/ant-test-nsc.bat @@ -0,0 +1,37 @@ +@echo off
+rem #####################################################-*-Bash-script-*-####
+rem # Test nsc
+rem ##########################################################################
+rem # $Id$
+
+if "%OS%"=="Windows_NT" @setlocal
+ +set _ANTCMD_ARGS=%1
+if ""%1""=="""" goto doneStart
+shift
+:setupArgs
+if ""%1""=="""" goto doneStart
+set _ANTCMD_ARGS=%_ANTCMD_ARGS% %1
+shift
+goto setupArgs +
+:doneStart
+call ant-common.bat
+
+rem ##########################################################################
+rem # ant build
+
+set ANT_CONFIG_BUILDFILE=test-nsc.xml
+set ANT_BUILDFILE=concrete-%ANT_CONFIG_BUILDFILE%
+set ANT_EXCLUDEFILE=developer/%USERNAME%/test-nsc-excludes.xml
+
+%CP% %ANT_CONFIG_BUILDFILE% %ANT_BUILDFILE%
+
+set CLASSPATH=%nsc_fjbg_jar%;%nsc_scala_jar%;%nsc_tools_jar%;%nsc_nsc_jar%;%nsc_nsc4ant_jar% +%_ANTCMD% -Dplatform=win -f %ANT_BUILDFILE% %_ANTCMD_ARGS%
+
+%RM% %ANT_BUILDFILE%
+
+##############################################################################
+
+if "%OS%"=="Windows_NT" @endlocal
diff --git a/setenv-bat.xsl b/setenv-bat.xsl new file mode 100644 index 0000000000..e18f33dfac --- /dev/null +++ b/setenv-bat.xsl @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="text" indent="no" /> + + <xsl:template match="/"> +@echo off + <xsl:apply-templates /> + </xsl:template> + + <xsl:template match="property"> +set nsc_<xsl:value-of select="substring-after(@name,'nsc.')" />=<xsl:value-of select="@value"/> + </xsl:template> + +</xsl:stylesheet> diff --git a/setenv-nsc.xml b/setenv-nsc.xml new file mode 100644 index 0000000000..a22471fbd2 --- /dev/null +++ b/setenv-nsc.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="scala.nsc" default="setenv"> + + <target name="setenv"> + + <property file="build-nsc.properties.${platform}" prefix="nsc." /> + + <echoproperties prefix="nsc." format="xml" destfile="/tmp/env.xml" /> + + <!-- generate "env.sh" (Unix) --> + + <xslt in="/tmp/env.xml" out="/tmp/env.sh" style="setenv-sh.xsl" /> + <copy file="/tmp/env.sh" tofile="env.sh"> + <filterchain> + <tokenfilter> + <ignoreblank /> + </tokenfilter> + </filterchain> + </copy> + + <!-- generate "env.bat" (Windows) --> + + <xslt in="/tmp/env.xml" out="/tmp/env.bat" style="setenv-bat.xsl" /> + <copy file="/tmp/env.bat" tofile="env.bat"> + <filterchain> + <tokenfilter> + <ignoreblank /> + </tokenfilter> + </filterchain> + </copy> + + </target> + +</project> + diff --git a/setenv-sh.xsl b/setenv-sh.xsl new file mode 100644 index 0000000000..9421721e0a --- /dev/null +++ b/setenv-sh.xsl @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="text" indent="no" /> + + <xsl:template match="/"> +#!/bin/bash + <xsl:apply-templates /> + </xsl:template> + + <xsl:template match="property"> +export nsc_<xsl:value-of select="substring-after(@name,'nsc.')" />=<xsl:value-of select="@value"/> + </xsl:template> + +</xsl:stylesheet> |