summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-04-01 23:51:11 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-04-02 07:48:57 -0700
commitceeb40cd89629f947e6e62988bb551157b601bf8 (patch)
tree12a8f65a0c37968dc1bc686b38bc784cb2d4a5f0 /build.xml
parent5dca660a93086fca5aa59eda8bfa3a67e2d88fe1 (diff)
downloadscala-ceeb40cd89629f947e6e62988bb551157b601bf8.tar.gz
scala-ceeb40cd89629f947e6e62988bb551157b601bf8.tar.bz2
scala-ceeb40cd89629f947e6e62988bb551157b601bf8.zip
Regularity for build.xml: 1 output dir / project
Untangle actors, msil builds from library/compiler builds. For further regularity, always build java files. TODO: update IDE projects
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml179
1 files changed, 89 insertions, 90 deletions
diff --git a/build.xml b/build.xml
index 1827a81d7a..3d2f9f5faa 100644
--- a/build.xml
+++ b/build.xml
@@ -410,9 +410,8 @@ targets exercised:
<!-- Download STARR (see above) via maven if `starr.version` is specified.
Want to slow down STARR changes, using only released versions. -->
<if><isset property="starr.version"/><then>
- <property name="strr" refid="starr.compiler.path"/>
<echo message="Using Scala ${starr.version} for STARR."/>
- <!-- <echo message="STARR classpath: ${strr}"/> -->
+ <!-- <echo message="STARR classpath: ${ant.refid:starr.compiler.path}"/> -->
</then><else>
<path id="starr.core.path">
<pathelement location="${library.starr.jar}"/>
@@ -449,6 +448,16 @@ targets exercised:
<path refid="aux.libs"/>
</path>
+ <path id="locker.actors.build.path">
+ <path refid="locker.library.build.path"/>
+ <pathelement location="${build-locker.dir}/classes/actors"/>
+ </path>
+
+ <path id="locker.msil.build.path">
+ <path refid="locker.compiler.build.path"/>
+ <pathelement location="${build-locker.dir}/classes/msil"/>
+ </path>
+
<path id="locker.reflect.build.path">
<path refid="locker.library.build.path"/>
<pathelement location="${build-locker.dir}/classes/reflect"/>
@@ -457,6 +466,7 @@ targets exercised:
<path id="locker.compiler.build.path">
<path refid="locker.reflect.build.path"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
+ <pathelement location="${build-locker.dir}/classes/msil"/>
<path refid="asm.classpath"/>
<path refid="fjbg.classpath"/>
<pathelement location="${jline.jar}"/>
@@ -471,23 +481,35 @@ targets exercised:
<path refid="aux.libs"/>
</path>
- <path id="quick.actors.build.path"><path refid="quick.library.build.path"/></path>
+ <path id="quick.actors.build.path">
+ <path refid="quick.library.build.path"/>
+ <pathelement location="${build-quick.dir}/classes/actors"/>
+ </path>
<path id="quick.reflect.build.path">
<path refid="quick.library.build.path"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
</path>
+ <path id="quick.msil.build.path">
+ <path refid="quick.compiler.build.path"/>
+ <pathelement location="${build-quick.dir}/classes/msil"/>
+ </path>
+
<path id="quick.compiler.build.path">
<path refid="quick.reflect.build.path"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/msil"/>
<path refid="asm.classpath"/>
<path refid="fjbg.classpath"/>
<pathelement location="${jline.jar}"/>
</path>
- <path id="quick.swing.build.path" refid="quick.library.build.path"/>
- <path id="quick.msil.build.path" refid="quick.compiler.build.path"/>
+ <path id="quick.swing.build.path">
+ <path refid="quick.library.build.path"/>
+ <path refid="quick.actors.build.path"/>
+ <pathelement location="${build-quick.dir}/classes/swing"/>
+ </path>
<path id="quick.plugins.build.path">
<path refid="quick.compiler.build.path"/>
@@ -496,6 +518,7 @@ targets exercised:
<path id="quick.scalacheck.build.path">
<pathelement location="${build-quick.dir}/classes/library"/>
+ <pathelement location="${build-quick.dir}/classes/actors"/>
<pathelement location="${build-quick.dir}/classes/scalacheck"/>
</path>
@@ -513,8 +536,10 @@ targets exercised:
<path id="quick.bin.tool.path">
<pathelement location="${build-quick.dir}/classes/library"/>
+ <pathelement location="${build-quick.dir}/classes/actors"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <pathelement location="${build-quick.dir}/classes/msil"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/continuations-library"/>
<pathelement location="${jline.jar}"/>
@@ -548,22 +573,18 @@ targets exercised:
</path>
<path id="pack.library.files">
- <fileset dir="${build-quick.dir}/classes/library">
- <!-- <exclude name="scala/swing/**"/> -->
- <exclude name="scala/actors/**"/>
- </fileset>
+ <fileset dir="${build-quick.dir}/classes/library"/>
<fileset dir="${build-quick.dir}/classes/continuations-library"/>
<fileset dir="${forkjoin-classes}"/>
</path>
<path id="pack.actors.files">
- <fileset dir="${build-quick.dir}/classes/library">
- <include name="scala/actors/**"/>
- </fileset>
+ <fileset dir="${build-quick.dir}/classes/actors"/>
</path>
<path id="pack.compiler.files">
<fileset dir="${build-quick.dir}/classes/compiler"/>
+ <fileset dir="${build-quick.dir}/classes/msil"/>
<fileset dir="${asm-classes}"/>
<fileset dir="${fjbg-classes}"/>
</path>
@@ -593,8 +614,11 @@ targets exercised:
<path refid="forkjoin.classpath"/>
<path refid="aux.libs"/>
</path>
- <path id="strap.actors.build.path" refid="strap.library.build.path"/>
- <path id="strap.msil.build.path" refid="strap.compiler.build.path"/>
+
+ <path id="strap.msil.build.path">
+ <path refid="strap.compiler.build.path"/>
+ <pathelement location="${build-strap.dir}/classes/msil"/>
+ </path>
<path id="strap.reflect.build.path">
<path refid="strap.library.build.path"/>
@@ -604,6 +628,7 @@ targets exercised:
<path id="strap.compiler.build.path">
<path refid="strap.reflect.build.path"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
+ <pathelement location="${build-strap.dir}/classes/msil"/>
<path refid="asm.classpath"/>
<path refid="fjbg.classpath"/>
<pathelement location="${jline.jar}"/>
@@ -775,6 +800,7 @@ targets exercised:
<attribute name="args" default=""/> <!-- additional args -->
<attribute name="destproject" default="@{project}"/> <!-- overrides the output directory; used when building multiple projects into the same directory-->
<attribute name="srcdir" default="@{project}"/>
+ <attribute name="java-excludes" default=""/>
<sequential>
<if><equals arg1="@{srcpath}" arg2="NOT SET"/><then>
@@ -824,20 +850,17 @@ targets exercised:
<attribute name="srcpath" default="NOT SET"/> <!-- needed to compile the library -->
<attribute name="args" default=""/> <!-- additional args -->
<attribute name="includes" default="comp.includes"/>
+ <attribute name="java-excludes" default=""/>
<attribute name="version" default=""/> <!-- non-empty for partest and scaladoc: use @{version}.version.number in property file-->
- <element name="pre" optional="true"/>
- <element name="post" optional="true"/>
-
<sequential>
<staged-uptodate stage="@{stage}" project="@{project}">
<check><srcfiles dir="${src.dir}/@{project}"/></check>
<do>
<stopwatch name="@{stage}.@{project}.timer"/>
<mkdir dir="${build-@{stage}.dir}/classes/@{project}"/>
- <pre/>
- <staged-scalac with="@{with}" stage="@{stage}" project="@{project}" srcpath="@{srcpath}" args="@{args}"/>
- <post/>
+ <staged-javac stage="@{stage}" project="@{project}" excludes="@{java-excludes}"/> <!-- HACK: always compile with javac -->
+ <staged-scalac with="@{with}" stage="@{stage}" project="@{project}" srcpath="@{srcpath}" args="@{args}" java-excludes="@{java-excludes}"/>
<if><equals arg1="@{version}" arg2=""/><then>
<propertyfile file = "${build-@{stage}.dir}/classes/@{project}/@{project}.properties">
<entry key = "version.number" value="${version.number}"/>
@@ -990,23 +1013,23 @@ targets exercised:
<!-- ===========================================================================
LOCAL REFERENCE BUILD (LOCKER)
============================================================================ -->
- <target name="locker.start" depends="asm.done, forkjoin.done, fjbg.done">
+ <target name="locker.start" depends="asm.done, forkjoin.done, fjbg.done">
<condition property="locker.locked"><available file="${build-locker.dir}/locker.locked"/></condition></target>
- <target name="locker.lib" depends="locker.start" unless="locker.locked">
- <staged-build with="starr" stage="locker" project="library" srcpath="${src.dir}/library" includes="lib.includes">
- <pre><staged-javac stage="locker" project="library" args="-XDignore.symbol.file"/></pre></staged-build></target>
- <!-- TODO: args="-XDignore.symbol.file" necessary?? -->
-
- <target name="locker.reflect" depends="locker.lib" unless="locker.locked"> <staged-build with="starr" stage="locker" project="reflect"/></target>
- <target name="locker.comp" depends="locker.reflect" unless="locker.locked">
- <staged-build with="starr" stage="locker" project="compiler">
- <pre>
- <staged-javac stage="locker" project="msil" destproject="compiler" excludes="**/tests/**"/>
- <staged-scalac with="starr" stage="locker" project="msil" destproject="compiler"/>
- </pre>
- </staged-build>
- </target>
+ <target name="locker.lib" depends="locker.start" unless="locker.locked">
+ <staged-build with="starr" stage="locker" project="library" srcpath="${src.dir}/library" includes="lib.includes"/></target>
+
+ <target name="locker.actors" depends="locker.lib" unless="locker.locked">
+ <staged-build with="starr" stage="locker" project="actors"/> </target>
+
+ <target name="locker.msil" depends="locker.lib" unless="locker.locked">
+ <staged-build with="starr" stage="locker" project="msil" java-excludes="**/tests/**"/> </target>
+
+ <target name="locker.reflect" depends="locker.lib" unless="locker.locked">
+ <staged-build with="starr" stage="locker" project="reflect"/></target>
+
+ <target name="locker.comp" depends="locker.reflect, locker.msil" unless="locker.locked">
+ <staged-build with="starr" stage="locker" project="compiler"/></target>
<target name="locker.done" depends="locker.comp">
<mkdir dir="${build-locker.dir}"/>
@@ -1021,45 +1044,31 @@ targets exercised:
<target name="quick.start" depends="locker.done"/>
<target name="quick.lib" depends="quick.start">
- <staged-build with="locker" stage="quick" project="library" srcpath="${src.dir}/library" includes="lib.rootdoc.includes">
- <pre>
- <staged-javac stage="quick" project="library" args="-XDignore.symbol.file"/> <!-- TODO: args="-XDignore.symbol.file" necessary?? -->
- <staged-javac stage="quick" project="actors" destproject="library"/>
- </pre>
- <post>
- <staged-scalac with="locker" stage="quick" project="actors" destproject="library"/>
- </post>
- </staged-build>
- </target>
+ <staged-build with="locker" stage="quick" project="library" srcpath="${src.dir}/library" includes="lib.rootdoc.includes"/></target>
- <target name="quick.reflect" depends="quick.lib"> <staged-build with="locker" stage="quick" project="reflect"/> </target>
+ <target name="quick.actors" depends="quick.lib">
+ <staged-build with="locker" stage="quick" project="actors"/> </target>
- <target name="quick.comp" depends="quick.reflect">
- <staged-build with="locker" stage="quick" project="compiler">
- <pre>
- <staged-javac stage="quick" project="msil" destproject="compiler" excludes="**/tests/**"/>
- <staged-scalac with="locker" stage="quick" project="msil" destproject="compiler"/>
- </pre>
- </staged-build>
- </target>
+ <target name="quick.msil" depends="quick.lib">
+ <staged-build with="locker" stage="quick" project="msil" java-excludes="**/tests/**"/> </target>
- <target name="quick.scalacheck" depends="quick.lib">
- <staged-build with="locker" stage="quick" project="scalacheck" args="-nowarn"/>
- </target>
+ <target name="quick.reflect" depends="quick.lib">
+ <staged-build with="locker" stage="quick" project="reflect"/> </target>
- <target name="quick.scalap" depends="quick.comp">
- <staged-build with="locker" stage="quick" project="scalap"/>
- </target>
+ <target name="quick.comp" depends="quick.reflect, quick.msil">
+ <staged-build with="locker" stage="quick" project="compiler"/> </target>
- <target name="quick.partest" depends="quick.scalap, quick.comp, asm.done">
- <staged-build with="locker" stage="quick" project="partest" version="partest">
- <pre><staged-javac stage="quick" project="partest"/></pre>
- </staged-build>
- </target>
+ <target name="quick.scalacheck" depends="quick.actors, quick.lib">
+ <staged-build with="locker" stage="quick" project="scalacheck" args="-nowarn"/> </target>
- <target name="quick.swing" depends="quick.lib" if="has.java6">
- <staged-build with="locker" stage="quick" project="swing"/>
- </target>
+ <target name="quick.scalap" depends="quick.comp">
+ <staged-build with="locker" stage="quick" project="scalap"/> </target>
+
+ <target name="quick.partest" depends="quick.scalap, quick.comp, asm.done">
+ <staged-build with="locker" stage="quick" project="partest" version="partest"/> </target>
+
+ <target name="quick.swing" depends="quick.actors, quick.lib" if="has.java6">
+ <staged-build with="locker" stage="quick" project="swing"/> </target>
<target name="quick.plugins" depends="quick.comp">
<staged-uptodate stage="quick" project="plugins">
@@ -1079,7 +1088,12 @@ targets exercised:
<!-- might split off library part into its own ant target -->
<mkdir dir="${build-quick.dir}/classes/continuations-library"/>
- <!-- have to compile with quick compiler here! -->
+ <!-- TODO: must build with quick to avoid
+ [quick.plugins] error: java.lang.NoClassDefFoundError: scala/tools/nsc/transform/patmat/PatternMatching
+ [quick.plugins] at scala.tools.selectivecps.SelectiveCPSTransform.newTransformer(SelectiveCPSTransform.scala:29)
+
+ WHY OH WHY!? scala/tools/nsc/transform/patmat/PatternMatching should be on locker.compiler.path
+ -->
<staged-scalac with="quick" stage="quick" project="plugins"
srcdir="continuations/library" destproject="continuations-library"
args="-Xplugin-require:continuations -P:continuations:enable -Xpluginsdir ${build-quick.dir}/misc/scala-devel/plugins"/>
@@ -1161,28 +1175,13 @@ targets exercised:
<!-- ===========================================================================
BOOTSTRAPPING BUILD (STRAP)
============================================================================ -->
- <target name="strap.lib" depends="quick.done">
- <staged-build with="quick" stage="strap" project="library" srcpath="${src.dir}/library" includes="lib.rootdoc.includes">
- <pre>
- <staged-javac stage="strap" project="library" args="-XDignore.symbol.file"/> <!-- TODO: args="-XDignore.symbol.file" necessary?? -->
- <staged-javac stage="strap" project="actors" destproject="library"/>
- </pre>
- <post>
- <staged-scalac with="quick" stage="strap" project="actors" destproject="library"/>
- </post>
- </staged-build>
+ <target name="strap.done" depends="pack.done">
+ <staged-build with="pack" stage="strap" project="library" srcpath="${src.dir}/library" includes="lib.rootdoc.includes"/>
+ <staged-build with="pack" stage="strap" project="msil" java-excludes="**/tests/**"/>
+ <staged-build with="pack" stage="strap" project="reflect"/>
+ <staged-build with="pack" stage="strap" project="compiler"/>
</target>
- <target name="strap.reflect" depends="strap.lib"> <staged-build with="pack" stage="strap" project="reflect"/> </target>
- <target name="strap.comp" depends="strap.reflect">
- <staged-build with="pack" stage="strap" project="compiler">
- <pre>
- <staged-javac stage="strap" project="msil" destproject="compiler" excludes="**/tests/**"/>
- <staged-scalac with="quick" stage="strap" project="msil" destproject="compiler"/>
- </pre>
- </staged-build>
- </target>
- <target name="strap.done" depends="strap.comp"/>
<target name="strap-opt" description="Optimized version of strap.done."> <optimized name="strap.done"/></target>
@@ -1278,7 +1277,7 @@ targets exercised:
TEST SUITE
============================================================================ -->
<!-- bootstrapping stability: compare {quick,strap}/(lib|reflect|comp) -->
- <target name="test.stability" depends="quick.lib, quick.reflect, quick.comp, strap.lib, strap.reflect, strap.comp">
+ <target name="test.stability" depends="strap.done">
<exec osfamily="unix" vmlauncher="false" executable="${basedir}/tools/stability-test.sh" failonerror="true" />
<!-- I think doing it this way means it will auto-pass on windows... that's the idea. If not, something like this. -->
<!-- <exec osfamily="windows" executable="foo" failonerror="false" failifexecutionfails="false" /> -->