[Laszlo-dev] [Laszlo-checkins] r7396 - openlaszlo/trunk
P T Withington
ptw at pobox.com
Wed Nov 28 03:29:58 PST 2007
When you have Voodoo like this, it's worth a comment in the source, so
someone doesn't come along and undo the voodoo that you do so well.
On 2007-11-27, at 20:04 EST, ben at openlaszlo.org wrote:
> Author: ben
> Date: 2007-11-27 17:04:50 -0800 (Tue, 27 Nov 2007)
> New Revision: 7396
>
> Modified:
> openlaszlo/trunk/build.xml
> Log:
> Change 20071127-ben-L by ben at slim.local on 2007-11-27 16:56:09 PST
> in /Users/ben/src/svn/openlaszlo/trunk-work-11-27-07-noon
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Continued tweaks to the don't-build-doc-twice-in-nightly-
> build fix
>
> Bugs Fixed: (again, I hope) LPP-3270 reference builds twice on
> nightly build
>
> Technical Reviewer: ptw (pending)
> QA Reviewer: mkratt (pending)
>
> Documentation:
> When calling an ant target from script in an ant file, as I do in the
> "doc" target, it is a good idea to be thorough, if one wants the code
> to work on a variety of architectures. To accomplish this, we
> explicitly
> request a local variable for the ant tasks we are creating
> programmatically. This apparently keeps the parent build alive long
> enough that when the child build completes, the parent build can
> continue. Without explicitly saying "var myTask..." the parent
> build would terminate as soon as it invokes the child build,
> and we'd never get to finish the parent build.
>
> As before, the doc should not build if skip.doc is true, if
> the doc has already been built, or if the OS is windows.
>
> Tests:
> Run a nightly build. It should work, and the doc should only be
> built once.
> Already verified on linux-builder that we get through building
> the doc and on to the next task, checking for tabs. (In my
> environment, checking for tabs failed because I didn't have
> the path to python correct, but that's not what we're
> worrying about right now.)
>
>
>
> Modified: openlaszlo/trunk/build.xml
> ===================================================================
> --- openlaszlo/trunk/build.xml 2007-11-28 01:04:26 UTC (rev 7395)
> +++ openlaszlo/trunk/build.xml 2007-11-28 01:04:50 UTC (rev 7396)
> @@ -600,11 +600,11 @@
> // 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");
> + var docBuildAlreadyDone = lps.getProperty("doc.build.done");
> + var shouldSkipDoc = lps.getProperty("skip.doc");
> + var buildPlatform = lps.getProperty("build.platform");
>
> - msgTask = lps.createTask("echo");
> + var msgTask = lps.createTask("echo");
>
> if (docBuildAlreadyDone) {
> msgTask.setMessage("------- doc build already done; not
> going to do it again ------- ");
> @@ -616,16 +616,19 @@
> msgTask.setMessage("------- skipping doc build because
> the doc doesn't build well on windows ------- ");
> msgTask.execute();
> } else {
> - msgTask.setMessage("------- main build.xml is going to
> call docs/src/build.xml ------- ");
> + var docSourceDir = new java.io.File("docs/src");
> + var docSourcePath = docSourceDir.getAbsolutePath();
> + msgTask.setMessage("------- main build.xml is going to
> call build in " + docSourcePath + "-----" );
> 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.setDir( docSourceDir );
> doctask.setTarget( "build" );
> + doctask.setOutput( "docbuild-out.log" );
> doctask.execute();
>
> - doneMsgTask = lps.createTask("echo");
> + var doneMsgTask = lps.createTask("echo");
> doneMsgTask.setMessage( "------------ done building doc
> in main build.xml -----------" );
> doneMsgTask.execute();
> }
>
>
> _______________________________________________
> Laszlo-checkins mailing list
> Laszlo-checkins at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
More information about the Laszlo-dev
mailing list