summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-12-22 18:21:56 +0000
committermichelou <michelou@epfl.ch>2005-12-22 18:21:56 +0000
commit2ec5c0424495224a0e28b62f3e78a65e304d2504 (patch)
tree45c56d192bf250cf2f772a5e9ad676ace8783980 /build.xml
parent5faf35dbd6cab28010a1822a459eb0eb6f4d1c75 (diff)
downloadscala-2ec5c0424495224a0e28b62f3e78a65e304d2504.tar.gz
scala-2ec5c0424495224a0e28b62f3e78a65e304d2504.tar.bz2
scala-2ec5c0424495224a0e28b62f3e78a65e304d2504.zip
- added properties 'os.win', 'os.cygwin' and 'o...
- added properties 'os.win', 'os.cygwin' and 'os.unix' Task 'symlink' is - now called only if 'os.unix' is set
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml33
1 files changed, 27 insertions, 6 deletions
diff --git a/build.xml b/build.xml
index a0c095d49e..eaa66d2e99 100644
--- a/build.xml
+++ b/build.xml
@@ -24,6 +24,9 @@
Sabbus requires additional memory. Please set the 'ANT_OPTS' environment
property to '-Xmx256M' or more.
</fail>
+ <condition property="os.win">
+ <os family="windows"/>
+ </condition>
<!-- Prevents system classpath from being used -->
<property name="build.sysclasspath" value="ignore"/>
@@ -84,7 +87,20 @@
##############################################################################
-->
- <target name="init">
+ <target name="init.cygwin" if="os.win">
+ <exec executable="cygpath" vmlauncher="false" errorproperty="err">
+ <arg value="--windir"/>
+ </exec>
+ <condition property="os.cygwin">
+ <equals arg1="${err}" arg2=""/>
+ </condition>
+ </target>
+
+ <target name="init" depends="init.cygwin">
+ <condition property="os.unix"><or>
+ <os family="unix"/><os family="mac"/>
+ <isset property="os.cygwin"/>
+ </or></condition>
<!-- Testing if everything is in place -->
<echo level="verbose">starr.lib.jar=${starr.lib.jar}</echo>
<fail message="STARR library in 'lib/' is not available">
@@ -234,6 +250,7 @@
<copy file="${src.dir}/${exec.dir.name}/scala.win.tmpl"
tofile="@{exec.dir}/scala.bat">
<filterset>
+ <filter token="product" value="scala"/>
<filter token="version" value="${version.number}"/>
<filter token="copyright" value="${copyright}"/>
<filter token="lib.path" value="@{lib.path}"/>
@@ -517,8 +534,15 @@
GENERATES A DISTRIBUTION
##############################################################################
-->
-
- <target name="dist" depends="test">
+
+ <target name="init.dist" if="os.unix">
+ <mkdir dir="${dist.current.dir}"/>
+ <symlink link="${dist.latest.dir}"
+ resource="${dist.current.dir}"
+ overwrite="yes"/>
+ </target>
+
+ <target name="dist" depends="test, init.dist">
<mkdir dir="${dist.current.dir}"/>
<mkdir dir="${dist.current.dir}/lib"/>
<jar destfile="${dist.current.dir}/lib/${comp.jar.name}"
@@ -543,9 +567,6 @@
fjbg.path="%SCALA_HOME%\lib\${fjbg.name}"
msil.path="%SCALA_HOME%\lib\${msil.name}"
exec.dir="${dist.current.dir}\bin"/>
- <symlink link="${dist.latest.dir}"
- resource="${dist.current.dir}"
- overwrite="yes"/>
</target>
<!--