Author: ben
Date: 2007-11-26 18:05:53 -0800 (Mon, 26 Nov 2007)
New Revision: 7378
Modified:
openlaszlo/trunk/build.xml
Log:
Change 20071126-ben-o by [EMAIL PROTECTED] on 2007-11-26 17:12:03 PST
in /Users/ben/src/svn/openlaszlo/trunk-docbuild
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Make doc build only build once on build machines.
Bugs Fixed: LPP-3270 Refguide is being built twice on build machines
Documentation:
The doc build takes a lot of time, and doesn't work well on windows,
at the moment, so we want fine control over when exactly to build it.
This change adds logic so that we won't build the doc if we've
already built it in this invocation of ant, if we're running on
a windows box, or if we've set skip.doc to true.
As before, if you just call
$ ant doc
it should build the doc.
To skip building the doc, pass in -Dskip.doc=true, like this:
$ ant -Dskip.doc=true build
Most importantly, calling ant dist-one should build the docs
exactly once.
Tests:
Run ant dist-one in the nightly build. Search for docs/reference/index.html
in the output. Before this change, it appeared twice, indicating that the
docs had built twice. After this change, it only appears once, indicating
that the docs only built once.
Also, verify that the windows build succeeded, and that it did not
try to build the docs.
Modified: openlaszlo/trunk/build.xml
===================================================================
--- openlaszlo/trunk/build.xml 2007-11-27 01:17:00 UTC (rev 7377)
+++ openlaszlo/trunk/build.xml 2007-11-27 02:05:53 UTC (rev 7378)
@@ -591,12 +591,51 @@
<!--================ Target [doc] ==============-->
<target name="doc"
- description="Build documentation"
- depends="init" unless="skip.doc">
-
- <!-- Build the docs -->
- <ant dir="docs/src" />
+ description="Build documentation">
+ <script language="javascript"><![CDATA[
+ // [bshine 2007.11.26] Fix for LPP-3720: Refguide is being built twice
on build machines.
+ // Don't build the doc if we're on windows
+ // Don't build the doc if skip.doc is set
+ // Don't build the doc if we've already built the doc
+
+ docBuildAlreadyDone = lps.getProperty("doc.build.done");
+ shouldSkipDoc = lps.getProperty("skip.doc");
+ buildPlatform = lps.getProperty("build.platform");
+
+ msgTask = lps.createTask("echo");
+
+ if (docBuildAlreadyDone) {
+ msgTask.setMessage("doc build already done; not going to do it
again.");
+ msgTask.execute();
+ } else if (shouldSkipDoc) {
+ msgTask.setMessage("skip.doc flag set; skipping doc build.");
+ msgTask.execute();
+ } else if (buildPlatform == "windows") {
+ msgTask.setMessage("not going to build doc because the doc doesn't
build well on windows");
+ msgTask.execute();
+ } else {
+ msgTask.setMessage("going to attempt to build the doc.");
+ msgTask.execute();
+
+ // We passed all of the guard tests. Let's really build the doc!
+ var doctask = lps.createTask("ant");
+ doctask.setDir( new java.io.File("docs/src") );
+ doctask.setTarget( "developers" )
+ doctask.execute();
+ }
+
+ ]]> </script>
+
+ <property name="doc.build.done" value="true" />
+ <echo message="------------------set doc.build.done to ${doc.build.done}
----------" />
+ </target>
+
+ <target name="doctwicetest">
+ <antcall target="doc"/>
+ <echo message="*******************************whoooop built it
once!***************************" />
+ <antcall target="doc" />
+ <echo message="*******************************did I build it
twice?!***************************" />
</target>
<!--================ Target [test] ==============-->
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins