On 2006-05-16, at 15:36 EDT, Benjamin Shine wrote:
>
> I seem to have the sc-compiler dependencies wrong, because it runs
> the sc-compiler target every time.
> Here's the dependency:
> <uptodate property="sc-compiler.uptodate"
> targetfile="${sc.build.java}/LFCCompiler.java">
> <srcfiles dir="${sc.src.py}" includes="*.py"
> excludes="test*.py,jsdoc2xml.py,xmldocutils.py"/>
> </uptodate>
>
> That dependency says, sc-compiler is uptodate if the targetfile has
> been modified after the srcfiles.
>
> <target name="sc-compiler" depends="init"
> unless="options.sc.skip,sc-compiler.uptodate"
> description="Run jythonc to create *.java files.">
>
> <mkdir dir="${sc.build.java}"/>
> <exec executable="${jython}" dir="${sc.src.py}"
> failonerror="true" >
> <arg value="${LPS_HOME}/3rd-party/tools/jythonc/
> jythonc.py"/>
> <arg line="--package org.openlaszlo.sc"/>
> <arg line="--workdir ../${build.java}"/>
> <arg value="--deep"/>
> <arg line="--compiler NONE"/>
> <arg value="parseinstructions"/>
> <arg value="LFCCompiler"/>
This is really the only source file. All this whole pile of stuff
does is compile LFCCompiler.py to LFCCompiler.java. A much better
solution would be to rewrite that file in Java (and move it to ../src/
org/openlaszlo/sc/
> <arg value="Regenerator"/>
I don't know how this Regenerator snuck back in. That is krank stuff
and should be gone.
> </exec>
> </target>
>
> but it looks to me like what we get are .class files, not .java files.
> Tucker, in plain english, what should the up to date check be for the
> sc-compiler target?
The script compiler really consists of the custom parser java in WEB-
INF/lps/server/sc/src/org/openlaszlo/sc/parser, the parser
intermediate .jj and .java files generated from WEB-INF/lps/server/sc/
src/org/openlaszlo/sc/Parser.jjt by jjtree and javacc, which get
left in WEB-INF/lps/server/build/src/org/openlaszlo/sc/parser, the
single python file LFCCompiler.py that gets compiled by jythonc to
WEB-INF/lps/server/build/src/org/openlaszlo/sc/*.java, and the java
sources in WEB-INF/lps/server/src/org/openlaszlo/sc/.
I dunno if that answers your question or raises more.
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev