Author: [email protected]
Date: Fri Jun 12 19:28:21 2009
New Revision: 5557

Modified:
    trunk/build.xml
    trunk/common.ant.xml
    trunk/tools/benchmark-viewer/build.xml
    trunk/user/build.xml

Log:
Ant top-level target rework to allow single-platform use.  Not that  
whereas "ant build" used to imply, by dependence through -do, "dist", it is  
now just building (and the default target is changed to "dist").  For  
develepment work, consider "ant dist-dev" to build a single-platform  
distribution without docs or samples.  For single-platform work,  
consider "ant dist-one" (or "ant buildonly," which now does only one  
platform).

Review by: zundel, scottb

Modified: trunk/build.xml
==============================================================================
--- trunk/build.xml     (original)
+++ trunk/build.xml     Fri Jun 12 19:28:21 2009
@@ -1,4 +1,4 @@
-<project name="GWT" default="build" basedir=".">
+<project name="GWT" default="dist" basedir=".">
    <property name="gwt.root" location="." />
    <property name="project.tail" value="" />
    <import file="${gwt.root}/common.ant.xml" />
@@ -6,67 +6,99 @@
    <!-- "build" is the default when subprojects are directly targetted  -->
    <property name="target" value="build" />

+  <!--
+     Convenience for the descending calls we make.  Use gwt.ant to
+     call into another directory, and this to call in the same build.xml
+    -->
+  <macrodef name="call-subproject">
+    <attribute name="subproject" />
+    <attribute name="subtarget" />
+    <sequential>
+      <antcall target="@{subproject}">
+        <param name="target" value="@{subtarget}" />
+      </antcall>
+    </sequential>
+  </macrodef>
+
    <property name="gwt.apicheck.config"
      location="tools/api-checker/config/gwt16_20userApi.conf"/>

-  <target name="buildonly" depends="dev, user, servlet, jni"  
description="Build without docs/samples">
-    <gwt.ant dir="distro-source" />
+  <target name="buildonly" depends="dev-one, user, servlet, jni-one"
+          description="Minimal one-platform devel build, without distro  
packaging">
    </target>

-  <target name="dist" depends="dev, user, servlet, tools, jni, doc,  
samples" description="Run the distributions">
+  <target name="dist" depends="build, doc" description="Make all the  
distributions">
      <gwt.ant dir="distro-source" />
    </target>

-  <target name="dev" depends="buildtools" description="Run dev">
+  <target name="dist-one" depends="buildonly, tools, samples, doc"  
description="Make only this platform's distribution">
+    <gwt.ant dir="distro-source" target="${build.host.platform}" />
+  </target>
+
+  <target name="dist-dev" depends="buildonly, tools" description="Make  
this platform's distribution, minus doc and samples">
+    <gwt.ant dir="distro-source" target="${build.host.platform}" />
+  </target>
+
+  <target name="dev" depends="buildtools" description="Builds (or runs  
${target} if set) all the dev libraries">
      <gwt.ant dir="dev" />
    </target>

-  <target name="user" depends="buildtools, dev" description="Run user">
+  <target name="dev-one" depends="buildtools" description="Builds only the  
dev library for this platform">
+    <gwt.ant dir="dev" target="${build.host.platform}"/>
+    <gwt.ant dir="dev" target="oophm"/>
+  </target>
+
+  <target name="user" depends="buildtools, dev-one" description="Builds  
(or runs ${target} if set) only the user library">
      <gwt.ant dir="user" />
    </target>

-  <target name="tools" depends="buildtools, user" description="Run tools">
+  <target name="tools" depends="buildtools, user" description="Builds (or  
runs ${target} if set) only the tools">
      <gwt.ant dir="tools" />
    </target>

-  <target name="servlet" depends="buildtools, user" description="Run  
servlet">
+  <target name="servlet" depends="buildtools, user" description="Builds  
(or runs ${target} if set) only the servlet jar">
      <gwt.ant dir="servlet" />
    </target>

-  <target name="jni" description="Run jni">
+  <target name="jni" description="Builds (or runs ${target} if set) jni  
for all platforms">
      <gwt.ant dir="jni" />
    </target>

-  <target name="doc" depends="buildtools, user" description="Build doc">
+  <target name="jni-one" description="Builds jni for only this platform">
+    <gwt.ant dir="jni" target="${build.host.platform}" />
+  </target>
+
+  <target name="doc" depends="buildtools, user" description="Builds (or  
runs ${target} if set) the doc">
      <gwt.ant dir="doc" />
    </target>

-  <target name="samples" depends="dev, user" description="Build samples">
+  <target name="samples" depends="dev-one, user" description="Builds (or  
runs ${target} if set) the samples">
      <gwt.ant dir="samples" />
    </target>

-  <target name="buildtools" description="Build the build tools">
+  <target name="buildtools" description="Build (or runs ${target} if set)  
the build tools">
      <gwt.ant dir="build-tools" />
    </target>

-  <target name="-do" depends="dist" description="Run all subprojects" />
-
-  <target name="build" description="Builds GWT">
-    <antcall target="-do">
-      <param name="target" value="build" />
-    </antcall>
+  <target name="build" description="Builds GWT, including samples, but  
without distro packaging"
+          depends="dev, user, servlet, tools, jni, samples">
    </target>

-  <target name="checkstyle" description="Static analysis of GWT source">
-    <antcall target="-do">
-      <param name="target" value="checkstyle" />
-    </antcall>
-  </target>
-
-  <target name="test" depends="build" description="Test GWT">
-    <antcall target="-do">
-      <param name="target" value="test" />
-    </antcall>
+  <target name="checkstyle" description="Does static analysis of GWT  
source">
+    <call-subproject subproject="buildtools" subtarget="checkstyle" />
+    <call-subproject subproject="dev" subtarget="checkstyle" />
+    <call-subproject subproject="user" subtarget="checkstyle" />
+    <call-subproject subproject="servlet" subtarget="checkstyle" />
+    <call-subproject subproject="tools" subtarget="checkstyle" />
+    <call-subproject subproject="samples" subtarget="checkstyle" />
+  </target>
+
+  <target name="test" depends="dist-one" description="Runs all the GWT  
tests">
+    <call-subproject subproject="buildtools" subtarget="test" />
+    <call-subproject subproject="dev" subtarget="test" />
+    <call-subproject subproject="user" subtarget="test" />
+    <call-subproject subproject="servlet" subtarget="test" />
+    <call-subproject subproject="tools" subtarget="test" />
    </target>

    <target name="clean" description="Cleans the entire GWT build">
@@ -74,7 +106,7 @@
    </target>

    <target name ="presubmit" description="Runs checkstyle,apichecker, and  
all tests" depends="test,apicheck-nobuild,checkstyle">          
- </target>
+  </target>
        
    <target name="apicheck-nobuild"
      description="Checks API compatibility to prior GWT revision">
@@ -101,6 +133,7 @@
      </java>
    </target>

-  <target name="apicheck" depends="build,apicheck-nobuild"/>
+  <target name="apicheck" depends="build,apicheck-nobuild"
+          description="Builds GWT and checks API compatiblity to prior  
release"/>

  </project>

Modified: trunk/common.ant.xml
==============================================================================
--- trunk/common.ant.xml        (original)
+++ trunk/common.ant.xml        Fri Jun 12 19:28:21 2009
@@ -303,12 +303,12 @@
    <!-- Default implementations of the required targets; projects should
    override the ones that matter -->
    <target name="all" depends="verify" />
-  <target name="verify" depends="checkstyle, test" description="Verify  
this project" />
-  <target name="checkstyle" description="Static analysis of source" />
-  <target name="test" depends="build" description="Test this project" />
-  <target name="build" description="Build and (maybe) package this  
project" />
+  <target name="verify" depends="checkstyle, test" description="Runs tests  
and checkstyle static analysis" />
+  <target name="checkstyle" />
+  <target name="test" depends="build" />
+  <target name="build" />

-  <target name="clean" description="Cleans this project's intermediate and  
output files">
+  <target name="clean">
      <delete dir="${project.build}" />
    </target>


Modified: trunk/tools/benchmark-viewer/build.xml
==============================================================================
--- trunk/tools/benchmark-viewer/build.xml      (original)
+++ trunk/tools/benchmark-viewer/build.xml      Fri Jun 12 19:28:21 2009
@@ -15,7 +15,7 @@
    <import file="${gwt.root}/common.ant.xml" />

      <!-- Platform shouldn't matter here, just picking one -->
-  <property.ensure name="gwt.dev.jar"  
location="${gwt.build.lib}/gwt-dev-linux.jar" />
+  <property.ensure name="gwt.dev.jar"  
location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" />
    <property.ensure name="gwt.user.jar"  
location="${gwt.build.lib}/gwt-user.jar" />
    <property.ensure name="gwt.servlet.jar"  
location="${gwt.build.lib}/gwt-servlet.jar" />


Modified: trunk/user/build.xml
==============================================================================
--- trunk/user/build.xml        (original)
+++ trunk/user/build.xml        Fri Jun 12 19:28:21 2009
@@ -44,7 +44,7 @@
    </path>

    <!-- Platform shouldn't matter here, just picking one -->
-  <property.ensure name="gwt.dev.jar"  
location="${gwt.build.lib}/gwt-dev-linux.jar" />
+  <property.ensure name="gwt.dev.jar"  
location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" />

    <target name="compile" description="Compile all class files">
      <mkdir dir="${javac.out}" />

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to