projekti pod git sistemom za održavanje verzija -- projects under
the git version control system
1 <project name=
"mjc2wsl" default=
"all">
3 Builder script for mjc2wsl and related tools, runs tests
7 <!-- use this file for any custom local needs -->
8 <property file=
"custom.properties"/>
9 <property environment=
"env"/>
11 <!-- try and detect the fermat.dir based on the operating system
12 should be set as a custom value in "custom.properties"
13 if it's in a non default location.
15 <condition property=
"fermat.dir" value=
"C:\fermat3">
16 <os family=
"windows" />
19 <condition property=
"fermat.dir" value=
"${user.home}/fermat3">
20 <not><os family=
"windows" /></not>
23 <property name=
"java.encoding" value=
"utf-8" />
24 <taskdef resource=
"net/sf/antcontrib/antlib.xml"/>
26 <!-- **************************************** -->
27 <!-- main variables that can be altered in the
28 properties file or through command line switches.
30 <!-- **************************************** -->
32 <!-- when using multiple threads there is a problem with logging!-->
33 <property name=
"global.max.threads" value=
"1" />
35 <property name=
"mjc2wsl.class.dir" value=
"bin" />
36 <property name=
"mjc2wsl.src.dir" value=
"src" />
37 <property name=
"mjc2wsl.options" value=
"" />
38 <property name=
"mjc2wsl.main" value=
"com.quemaster.transformations.mjc2wsl.Mjc2wsl" />
40 <property name=
"res.dir" value=
"res" />
41 <property name=
"dist.dir" value=
"dist" />
43 <property name=
"compiler.class.jar" value=
"lib/mj.jar" />
44 <property name=
"compiler.class.dir" value=
"lib/compiler-bin" />
45 <property name=
"compiler.src.dir" value=
"lib/compiler-src" />
46 <property name=
"compiler.classname.compiler" value=
"MJ.Compiler" />
47 <property name=
"compiler.classname.interpreter" value=
"MJ.Run" />
48 <property name=
"compiler.classname.decoder" value=
"MJ.Decode" />
50 <property name=
"samples.main.dir" value=
"samples/alpha-mj" />
51 <property name=
"samples.temp.dir" value=
"temp/alpha-mj" />
53 <property name=
"transf.wsl.file" value=
"src-wsl/hill_climbing.wsl" />
54 <property name=
"transf.wsl.ini" value=
"transf.ini" />
55 <property name=
"transf.wsl.ext" value=
"_tr.wsl" />
56 <!-- args can be used to send additional arguments to a script -->
57 <property name=
"transf.wsl.args" value=
"" />
59 <property name=
"metrics.wsl.file" value=
"src-wsl/metrics_csv.wsl" />
60 <property name=
"metrics.extension" value=
".met" />
62 <property name=
"tests.dir" value=
"tests" />
64 <property name=
"log.dir" value=
"${basedir}/logs" />
65 <property name=
"log.file.transformations" value=
"${log.dir}/transformations" />
66 <property name=
"log.file.mjc2wsl" value=
"${log.dir}/mjc2wsl" />
67 <property name=
"log.file.tests.m" value=
"${log.dir}/tests-mj" />
68 <property name=
"log.file.tests.t" value=
"${log.dir}/tests-wsl" />
70 <property name=
"version.file" value=
"${res.dir}/com/quemaster/transformations/mjc2wsl/version.properties" />
72 <!-- **************************************** -->
74 <!-- **************************************** -->
76 <patternset id=
"non.transformed.sources">
77 <include name=
"**/*.wsl"/>
78 <exclude name=
"**/*${transf.wsl.ext}"/>
81 <patternset id=
"transformed.sources">
82 <include name=
"**/*${transf.wsl.ext}"/>
85 <!-- **************************************** -->
86 <!-- general tasks -->
87 <!-- **************************************** -->
89 <target name=
"init" depends=
"init-time">
90 <mkdir dir=
"${mjc2wsl.class.dir}"/>
91 <mkdir dir=
"${compiler.class.dir}"/>
92 <mkdir dir=
"${samples.temp.dir}"/>
93 <mkdir dir=
"${log.dir}"/>
94 <mkdir dir=
"${dist.dir}"/>
95 <copy todir=
"${samples.temp.dir}">
96 <fileset dir=
"${samples.main.dir}">
97 <include name=
"*.mj"/>
102 <target name=
"init-time">
104 <format property=
"time" pattern=
"yy-MM-dd--HH-mm-ss-SSS"/>
108 <target name=
"all" depends='mj-samples,mjc2wsl-samples,wsl-transf-samples,metrics-samples-compare-wsl'
109 description=
"build the tools, run them on the samples to check">
113 <target name=
"clean" description=
"clean up all the generated content">
114 <delete includeemptydirs=
"true">
115 <fileset dir=
"${mjc2wsl.class.dir}"/>
116 <fileset dir=
"${compiler.class.dir}"/>
117 <fileset dir=
"${samples.temp.dir}"/>
118 <fileset dir=
"${log.dir}"/>
122 <target name=
"pack.jar" depends=
"build,update-version-string"
123 description=
"Packs the binaries in a jar and place it in ${dist.dir}">
125 <mkdir dir=
"${dist.dir}"/>
126 <jar destfile=
"${dist.dir}/mjc2wsl.jar"
129 <attribute name=
"Built-By" value=
"${user.name}"/>
130 <attribute name=
"Implementation-Vendor"
131 value=
"Doni Pracner"/>
132 <attribute name=
"Implementation-Title"
133 value=
"MicroJava bytecode to WSL"/>
134 <attribute name=
"Implementation-Version" value=
"${version}"/>
135 <attribute name=
"Main-Class" value=
"${mjc2wsl.main}"/>
137 <fileset dir=
"${mjc2wsl.class.dir}"/>
142 <!-- **************************************** -->
144 based on ideas by Jesper Öqvist http://llbit.se/?p=1876 -->
145 <!-- **************************************** -->
147 <!-- this target is only run if the 'version' property is undefined -->
149 <target name=
"update-version-string" unless=
"version">
150 <!-- get a new version string using git describe if possible -->
151 <echo message=
"Updating version string..."/>
152 <exec executable=
"git" outputproperty=
"version"
153 failifexecutionfails=
"false">
154 <arg value=
"describe"/>
156 <antcall target=
"-store-version-string"/>
157 <!-- ensure version is defined even if git was not available -->
158 <property file=
"${version.file}"/>
161 <target name=
"-store-version-string" if=
"version">
162 <!-- store the new version string in the correct property file -->
163 <echo message=
"version=${version}"/>
164 <dirname file=
"${version.file}" property=
"version.file.dir"/>
165 <mkdir dir=
"${version.file.dir}" />
166 <propertyfile file=
"${version.file}">
167 <entry key=
"version" value=
"${version}"/>
169 <exec executable=
"git" failifexecutionfails=
"false">
170 <arg value=
"update-index"/>
171 <arg value=
"--assume-unchanged"/>
172 <arg value=
"${version.file}"/>
176 <!-- **************************************** -->
177 <!-- mjc2wsl related tasks -->
178 <!-- **************************************** -->
180 <target name=
"build" depends=
"init,update-version-string" description=
"build the mjc2wsl tool">
181 <javac srcdir=
"${mjc2wsl.src.dir}" destdir=
"${mjc2wsl.class.dir}" includeAntRuntime='no'
/>
182 <copy todir=
"${mjc2wsl.class.dir}">
183 <fileset dir=
"${res.dir}"/>
187 <target name=
"mjc2wsl">
188 <echo message=
"${filename}" />
189 <java classpath=
"${mjc2wsl.class.dir}:${res.dir}" classname=
"${mjc2wsl.main}">
190 <arg line=
"${mjc2wsl.options}" />
191 <arg value=
"${filename}" />
195 <target name=
"mjc2wsl-samples" depends=
"build,init-time" description=
"run the mjc2wsl tool on the samples">
196 <record name=
"${log.file.mjc2wsl}${time}.txt" emacsmode=
"true" />
197 <echo>Used options:${mjc2wsl.options}
</echo>
198 <foreach param=
"filename" target=
"mjc2wsl" parallel=
"true" maxthreads=
"${global.max.threads}">
200 <fileset dir='${samples.temp.dir}'
>
201 <include name=
"*.obj"/>
205 <record name=
"${log.file.mjc2wsl}${time}.txt" action=
"stop" />
206 <copy file=
"${log.file.mjc2wsl}${time}.txt" tofile=
"${log.file.mjc2wsl}.txt"/>
209 <target name=
"mjc2wsl-samples1" depends=
"build">
210 <!-- simplistic version when antlib (foreach) is not available -->
211 <antcall target=
"mjc2wsl">
212 <param name=
"filename" value=
"samples-temp/sample0.obj" />
217 <!-- **************************************** -->
218 <!-- MicroJava related tasks -->
219 <!-- **************************************** -->
222 <target name=
"mj-build" depends=
"init" description=
"build the mj compiler">
223 <javac srcdir=
"${compiler.src.dir}" destdir=
"${compiler.class.dir}" includeAntRuntime='no'
/>
226 <target name=
"mj-compile" description=
"compile a MJ into obj file; given ${filename}">
227 <echo message=
"${filename}" />
228 <java classpath=
"${compiler.class.dir}:${compiler.class.jar}" classname=
"${compiler.classname.compiler}">
229 <arg value=
"${filename}" />
233 <target name=
"mj-samples" description=
"run the mj compiler on the samples" depends=
"init">
234 <foreach param=
"filename" target=
"mj-compile" parallel=
"true" maxthreads=
"${global.max.threads}">
236 <fileset dir='${samples.temp.dir}'
>
237 <include name=
"*.mj"/>
243 <target name=
"mj-decode" description=
"decode a MJ obj file given in ${filename}">
244 <echo message=
"${filename}" />
245 <java classpath=
"${compiler.class.dir}:${compiler.class.jar}"
246 classname=
"${compiler.classname.decoder}"
247 output=
"${filename}.decoded" >
248 <arg value=
"${filename}" />
252 <target name=
"mj-decode-samples" description=
"decode all of the obj files in ${samples.temp.dir}">
253 <foreach param=
"filename" target=
"mj-decode">
255 <fileset dir='${samples.temp.dir}'
>
256 <include name=
"*.obj"/>
262 <target name=
"mj-run" description=
"run a MJ obj file given in ${filename} with ${inputstring}">
263 <echo message=
"${filename}" />
264 <java classpath=
"${compiler.class.dir}:${compiler.class.jar}" classname=
"${compiler.classname.interpreter}" inputstring=
"${inputstring}">
265 <arg value=
"${filename}" />
269 <target name=
"mj-samples1" depends=
"mj-build">
270 <!-- simplistic version when antlib (foreach) is not available -->
271 <antcall target=
"mj-compile">
272 <param name=
"filename" value=
"samples-temp/sample.mj" />
274 <antcall target=
"mj-compile">
275 <param name=
"filename" value=
"samples-temp/sample1.mj" />
277 <antcall target=
"mj-compile">
278 <param name=
"filename" value=
"samples-temp/sample0.mj" />
283 <!-- **************************************** -->
284 <!-- wsl related tasks -->
285 <!-- **************************************** -->
287 <target name=
"wsl-run" >
288 <property name=
"args" value=
""/>
289 <property name=
"wslrun.workdir" value=
""/>
290 <exec executable=
"${fermat.dir}/bin/wsl" inputstring=
"${inputstring}"
291 dir=
"${wslrun.workdir}" >
292 <env key=
"PATH" path=
"${fermat.dir}/bin:${env.PATH}"/>
293 <env key=
"FermaT" path=
"${fermat.dir}" />
294 <env key=
"SCHEME_LIBRARY_PATH" path=
"${fermat.dir}/slib/" />
295 <env key=
"SCM_INIT_PATH" path=
"${fermat.dir}/scm/Init5e7.scm" />
296 <arg line=
"${filename} ${args}"/>
300 <target name=
"wsl-transf"
301 description=
"transform (simplify) a single wsl file generated by mjc2wsl">
302 <stopwatch name=
"transf-${transf.filename}" action=
"start"/>
303 <antcall target=
"wsl-run">
304 <param name=
"filename" value=
"${transf.wsl.file}" />
305 <param name=
"args" value=
"${transf.wsl.args} ${transf.filename}" />
307 <record name=
"${transf.filename}-time.txt" action=
"start" emacsmode=
"true"/>
308 <stopwatch name=
"transf-${transf.filename}" action=
"total"/>
309 <record name=
"${transf.filename}-time.txt" action=
"stop"/>
312 <target name=
"wsl-transf-samples" depends=
"init"
313 description=
"transform (simplify) the wsl files generated by mjc2wsl" >
314 <record name=
"${log.file.transformations}${time}.txt" emacsmode=
"true" />
315 <foreach param=
"transf.filename" target=
"wsl-transf" parallel=
"true" maxthreads=
"${global.max.threads}">
317 <fileset dir='${samples.temp.dir}'
>
318 <patternset refid=
"non.transformed.sources"/>
323 <record name=
"${log.file.transformations}${time}.txt" action=
"stop" />
324 <copy file=
"${log.file.transformations}${time}.txt" tofile=
"${log.file.transformations}.txt"/>
327 <target name=
"wsl-transf-samples-ini" depends=
"init-time,make-transf-ini-samples"
328 description=
"transform (simplify) the wsl files generated by mjc2wsl - uses ini file">
329 <record name=
"${log.file.transformations}${time}i.txt" emacsmode=
"true" />
330 <antcall target=
"wsl-run">
331 <param name=
"filename" value=
"${transf.wsl.file}" />
333 <record name=
"${log.file.transformations}${time}i.txt" action=
"stop" />
334 <copy file=
"${log.file.transformations}${time}i.txt" tofile=
"${log.file.transformations}.txt"/>
337 <target name=
"make-transf-ini-samples">
338 <fileset dir=
"${samples.temp.dir}" casesensitive=
"no" id=
"generated-wsl-fileset">
339 <patternset refid=
"non.transformed.sources"/>
341 <pathconvert pathsep=
"${line.separator}"
342 property=
"generated-wsl-files" refid=
"generated-wsl-fileset" />
344 <echo file=
"${transf.wsl.ini}">${generated-wsl-files}
</echo>
348 <!-- **************************************** -->
349 <!-- Testing tasks -->
350 <!-- **************************************** -->
352 <target name=
"manual-test-run"
353 description=
"run .obj .wsl ${transf.wsl.ext}, given are ${file.dir}, ${file.name} (no extension) and an ${inputstring}">
354 <record name=
"${file.dir}/${file.name}.out1" emacsmode=
"true" />
355 <antcall target=
"mj-run">
356 <param name=
"filename" value=
"${file.dir}/${file.name}.obj" />
357 <param name=
"inputstring" value=
"${inputstring}" />
359 <record name=
"${file.dir}/${file.name}.out1" action=
"stop" />
360 <record name=
"${file.dir}/${file.name}.out2" emacsmode=
"true" />
361 <antcall target=
"wsl-run">
362 <param name=
"filename" value=
"${file.dir}/${file.name}.wsl" />
363 <param name=
"inputstring" value=
"${inputstring}" />
365 <record name=
"${file.dir}/${file.name}.out2" action=
"stop" />
366 <record name=
"${file.dir}/${file.name}.out3" emacsmode=
"true" />
367 <antcall target=
"wsl-run">
368 <param name=
"filename" value=
"${file.dir}/${file.name}${transf.wsl.ext}" />
369 <param name=
"inputstring" value=
"${inputstring}" />
371 <record name=
"${file.dir}/${file.name}.out3" action=
"stop" />
374 <target name=
"manual-test-run-samples-dir"
375 description=
"run .obj .wsl ${transf.wsl.ext}, in the samples-temp directory; given ${file.name} (no extension) and an ${inputstring}">
376 <antcall target=
"manual-test-run">
377 <param name=
"file.dir" value=
"${samples.temp.dir}"/>
381 <target name=
"init-compare">
382 <mkdir dir=
"${samples.temp.dir}/outputs"/>
385 <target name=
"test-m-w">
387 <basename property=
"file.out" file=
"${inputfile}" suffix=
".txt"/>
389 <java classpath=
"${compiler.class.dir}:${compiler.class.jar}"
390 classname=
"${compiler.classname.interpreter}"
392 error=
"${samples.temp.dir}/outputs/${file.out}.errmj"
393 output=
"${samples.temp.dir}/outputs/${file.out}.outmj">
394 <arg value=
"${file.dir}/${file.name}.obj" />
397 <exec executable=
"${fermat.dir}/bin/wsl"
399 error=
"${samples.temp.dir}/outputs/${file.out}.errwsl"
400 output=
"${samples.temp.dir}/outputs/${file.out}.outwsl" >
401 <env key=
"PATH" path=
"${fermat.dir}/bin:${env.PATH}"/>
402 <env key=
"FermaT" path=
"${fermat.dir}" />
403 <env key=
"SCHEME_LIBRARY_PATH" path=
"${fermat.dir}/slib/" />
404 <env key=
"SCM_INIT_PATH" path=
"${fermat.dir}/scm/Init5e7.scm" />
405 <arg value=
"${file.dir}/${file.name}.wsl"/>
408 <exec executable=
"perl" resultproperty=
"ook">
409 <arg value=
"lib/compare-m-w.pl"/>
410 <arg value=
"${file.dir}/outputs"/>
411 <arg value=
"${file.out}"/>
416 <target name=
"test-w-wt">
418 <basename property=
"file.out" file=
"${inputfile}" suffix=
".txt"/>
420 <exec executable=
"${fermat.dir}/bin/wsl"
422 error=
"${samples.temp.dir}/outputs/${file.out}.errwsl"
423 output=
"${samples.temp.dir}/outputs/${file.out}.outwsl" >
424 <env key=
"PATH" path=
"${fermat.dir}/bin:${env.PATH}"/>
425 <env key=
"FermaT" path=
"${fermat.dir}" />
426 <env key=
"SCHEME_LIBRARY_PATH" path=
"${fermat.dir}/slib/" />
427 <env key=
"SCM_INIT_PATH" path=
"${fermat.dir}/scm/Init5e7.scm" />
428 <arg value=
"${file.dir}/${file.name}.wsl"/>
431 <exec executable=
"${fermat.dir}/bin/wsl"
433 error=
"${samples.temp.dir}/outputs/${file.out}.errwslt"
434 output=
"${samples.temp.dir}/outputs/${file.out}.outwslt" >
435 <env key=
"PATH" path=
"${fermat.dir}/bin:${env.PATH}"/>
436 <env key=
"FermaT" path=
"${fermat.dir}" />
437 <env key=
"SCHEME_LIBRARY_PATH" path=
"${fermat.dir}/slib/" />
438 <env key=
"SCM_INIT_PATH" path=
"${fermat.dir}/scm/Init5e7.scm" />
439 <arg value=
"${file.dir}/${file.name}${transf.wsl.ext}"/>
442 <exec executable=
"perl">
443 <arg value=
"lib/compare-w-wt.pl"/>
444 <arg value=
"${file.dir}/outputs"/>
445 <arg value=
"${file.out}"/>
449 <target name=
"test-fn">
450 <basename property=
"file.name" file=
"${filename}" suffix=
".obj"/>
451 <dirname property=
"file.dir" file=
"${filename}"/>
452 <foreach param=
"inputfile" target=
"test-m-w" inheritall=
"true">
454 <fileset dir='${tests.dir}'
>
455 <include name=
"${file.name}*.txt"/>
461 <target name=
"test-fn-t">
462 <basename property=
"file.name" file=
"${filename}" suffix=
"${transf.wsl.ext}"/>
463 <dirname property=
"file.dir" file=
"${filename}"/>
464 <foreach param=
"inputfile" target=
"test-w-wt" inheritall=
"true">
466 <fileset dir='${tests.dir}'
>
467 <include name=
"${file.name}*.txt"/>
473 <target name=
"test-all-m" depends=
"init-compare,init-time"
474 description=
"Run all the tests from the test directory to compare MJ and WSL" >
475 <record name=
"${log.file.tests.m}${time}.txt" emacsmode=
"true" />
476 <foreach param=
"filename" target=
"test-fn" inheritall=
"true">
478 <fileset dir='${samples.temp.dir}'
>
479 <include name=
"*.obj"/>
483 <record name=
"${log.file.tests.m}${time}.txt" action=
"stop" />
484 <move file=
"${log.file.tests.m}.txt" tofile=
"${log.file.tests.m}-previous.txt" failonerror=
"false"/>
485 <copy file=
"${log.file.tests.m}${time}.txt" tofile=
"${log.file.tests.m}.txt"/>
488 <target name=
"test-all-t" depends=
"init-compare,init-time"
489 description=
"Run all the tests from the test directory to compare WSL and transformations" >
490 <record name=
"${log.file.tests.t}${time}.txt" emacsmode=
"true" />
491 <foreach param=
"filename" target=
"test-fn-t">
493 <fileset dir='${samples.temp.dir}'
>
494 <include name=
"*${transf.wsl.ext}"/>
498 <record name=
"${log.file.tests.t}${time}.txt" action=
"stop" />
499 <move file=
"${log.file.tests.t}.txt" tofile=
"${log.file.tests.t}-previous.txt" failonerror=
"false"/>
500 <copy file=
"${log.file.tests.t}${time}.txt" tofile=
"${log.file.tests.t}.txt"/>
503 <target name=
"q-test">
504 <!-- for quick tests -->
505 <antcall target=
"test-fn">
506 <param name=
"file.name" value=
"Rek1"/>
507 <param name=
"file.dir" value=
"${samples.temp.dir}"/>
512 <!-- **************************************** -->
514 <!-- **************************************** -->
516 <target name=
"metrics-compare-wsl">
517 <basename property=
"metrics.temp.name" file=
"${metrics.run.filename}" suffix=
"${transf.wsl.ext}"/>
518 <dirname property=
"metrics.temp.dir" file=
"${metrics.run.filename}"/>
519 <antcall target=
"wsl-run">
520 <param name=
"filename" value=
"${metrics.wsl.file}" />
521 <param name=
"args" value=
"-o ${metrics.temp.dir}/${metrics.temp.name}${metrics.extension} -c ${metrics.temp.dir}/${metrics.temp.name}.wsl ${metrics.temp.dir}/${metrics.temp.name}${transf.wsl.ext}" />
527 <target name=
"metrics-samples-compare-wsl" depends=
"init"
528 description=
"metrics on transformed wsl files (csv file)" >
530 <antcall target=
"wsl-run">
531 <param name=
"filename" value=
"${metrics.wsl.file}" />
532 <param name=
"args" value=
"-o ${samples.temp.dir}/0000-header${metrics.extension} -HC" />
536 <foreach param=
"metrics.run.filename" target=
"metrics-compare-wsl" parallel=
"true" maxthreads=
"${global.max.threads}">
538 <fileset dir='${samples.temp.dir}'
>
539 <patternset refid=
"transformed.sources"/>
544 <concat destfile=
"${samples.temp.dir}/metrics-wsl-compare.csv">
545 <fileset dir=
"${samples.temp.dir}" includes=
"*${metrics.extension}"/>
550 <!-- **************************************** -->
551 <!-- output serveral versions of files -->
552 <!-- **************************************** -->
554 <target name=
"output-all-versions"
555 description=
"generate variations on the translations in the 'local' folder and tar them">
557 <fileset dir=
"local/out/"/>
559 <mkdir dir=
"local/out"/>
561 <target name=
"mj-samples"/>
562 <target name=
"mjc2wsl-samples"/>
563 <param name=
"samples.temp.dir" value=
"local/out/headTail-proc"/>
564 <param name=
"mjc2wsl.options" value=
""/>
567 <target name=
"mj-samples"/>
568 <target name=
"mjc2wsl-samples"/>
569 <param name=
"samples.temp.dir" value=
"local/out/headTail-inline"/>
570 <param name=
"mjc2wsl.options" value=
"--genInlinePrint"/>
573 <target name=
"mj-samples"/>
574 <target name=
"mjc2wsl-samples"/>
575 <param name=
"samples.temp.dir" value=
"local/out/popPush-inline"/>
576 <param name=
"mjc2wsl.options" value=
"--genPopPush --genInlinePrint"/>
579 <target name=
"mj-samples"/>
580 <target name=
"mjc2wsl-samples"/>
581 <param name=
"samples.temp.dir" value=
"local/out/popPush-proc"/>
582 <param name=
"mjc2wsl.options" value=
"--genPopPush"/>
585 <target name=
"mj-samples"/>
586 <target name=
"mjc2wsl-samples"/>
587 <param name=
"samples.temp.dir" value=
"local/out/popPush-glob"/>
588 <param name=
"mjc2wsl.options" value=
"--genPopPush --genGlobalVars"/>
591 <target name=
"mj-samples"/>
592 <target name=
"mjc2wsl-samples"/>
593 <param name=
"samples.temp.dir" value=
"local/out/popPush-loc-separate"/>
594 <param name=
"mjc2wsl.options" value=
"--genPopPush --genInlinePrint --genLocalsSeparate --genLocalVars"/>
596 <tar basedir=
"local/out" compression=
"gzip"
597 destfile=
"local/mjc2wsl-samples.tgz"
602 <!-- **************************************** -->
603 <!-- output a comparison Latex file and compile it -->
604 <!-- **************************************** -->
606 <target name=
"output-comparison-pdf-single">
607 <basename property=
"file.name" file=
"${filename}" suffix=
".mj"/>
608 <echo append='true'
file=
"${samples.temp.dir}/tex/comparison.tex">
609 \section{${file.name}}
611 \lstinputlisting[style=mj]{../${file.name}.mj}
613 \lstinputlisting[style=decoded]{../${file.name}.obj.decoded}
615 \lstinputlisting[style=wsl,lastline=
200]{../${file.name}.wsl}
617 \lstinputlisting[style=wslt,lastline=
200]{../${file.name}${transf.wsl.ext}}
622 <target name=
"output-comparison-pdf"
623 description=
"Makes a parallel display in Latex and produces a pdf (tex dir in temp dir)" >
625 <copy file=
"lib/tex/comparison-start.tex" overwrite=
"true"
626 tofile=
"${samples.temp.dir}/tex/comparison.tex"/>
627 <foreach param=
"filename" target=
"output-comparison-pdf-single" inheritall=
"true">
629 <fileset dir='${samples.temp.dir}'
>
630 <include name=
"*.mj"/>
634 <concat destfile=
"${samples.temp.dir}/tex/comparison.tex" append=
"true">
635 <filelist dir=
"lib/tex" files=
"comparison-end.tex"/>
637 <antcall target=
"output-comparison-compile"/>
640 <target name=
"output-comparison-compile">
641 <exec command=
"pdflatex comparison.tex"
642 dir=
"${samples.temp.dir}/tex"/>
645 <!-- jedit specific flags; needs to be the first or the last 10 lines