gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
TransMessages improvements
[mjc2wsl.git] / build.xml
index 17ee30f..6f2572b 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -35,6 +35,7 @@
     <property name="mjc2wsl.class.dir" value="bin" />
     <property name="mjc2wsl.src.dir" value="src" />
     <property name="mjc2wsl.options" value="" />
     <property name="mjc2wsl.class.dir" value="bin" />
     <property name="mjc2wsl.src.dir" value="src" />
     <property name="mjc2wsl.options" value="" />
+    <property name="mjc2wsl.main" value="com.quemaster.transformations.mjc2wsl.Mjc2wsl" />
 
     <property name="res.dir" value="res" />
     <property name="dist.dir" value="dist" />
 
     <property name="res.dir" value="res" />
     <property name="dist.dir" value="dist" />
     <property name="transf.wsl.file" value="src-wsl/transf-min.wsl" />
     <property name="transf.wsl.ini" value="transf.ini" />
     <property name="transf.wsl.ext" value="_t.wsl" />
     <property name="transf.wsl.file" value="src-wsl/transf-min.wsl" />
     <property name="transf.wsl.ini" value="transf.ini" />
     <property name="transf.wsl.ext" value="_t.wsl" />
+    <!-- args can be used to send additional arguments to a script -->
+    <property name="transf.wsl.args" value="" />
 
 
-    <property name="metrics.wsl.file" value="src-wsl/metrics.wsl" />
+    <property name="metrics.wsl.file" value="src-wsl/metrics_csv.wsl" />
     <property name="metrics.extension" value=".met" />
 
     <property name="tests.dir" value="tests" />
 
     <property name="metrics.extension" value=".met" />
 
     <property name="tests.dir" value="tests" />
 
-    <property name="log.dir" value="logs" />
+    <property name="log.dir" value="${basedir}/logs" />
     <property name="log.file.transformations" value="${log.dir}/transformations" />
     <property name="log.file.mjc2wsl" value="${log.dir}/mjc2wsl" />
     <property name="log.file.tests.m" value="${log.dir}/tests-mj" />
     <property name="log.file.transformations" value="${log.dir}/transformations" />
     <property name="log.file.mjc2wsl" value="${log.dir}/mjc2wsl" />
     <property name="log.file.tests.m" value="${log.dir}/tests-mj" />
 
     <target name="init-time">
         <tstamp>
 
     <target name="init-time">
         <tstamp>
-          <format property="time" pattern="yy-MM-dd--HH-mm-ss"/>
+          <format property="time" pattern="yy-MM-dd--HH-mm-ss-SSS"/>
         </tstamp>
     </target>
 
         </tstamp>
     </target>
 
               <attribute name="Implementation-Title"
                value="MicroJava bytecode to WSL"/>
               <attribute name="Implementation-Version" value="${version}"/>
               <attribute name="Implementation-Title"
                value="MicroJava bytecode to WSL"/>
               <attribute name="Implementation-Version" value="${version}"/>
-              <attribute name="Main-Class" value="com.quemaster.transformations.mjc2wsl.mjc2wsl"/>
+              <attribute name="Main-Class" value="${mjc2wsl.main}"/>
             </manifest>
             <fileset dir="${mjc2wsl.class.dir}"/>
         </jar>
             </manifest>
             <fileset dir="${mjc2wsl.class.dir}"/>
         </jar>
 
     <target name="mjc2wsl">
         <echo message="${filename}" />
 
     <target name="mjc2wsl">
         <echo message="${filename}" />
-        <java classpath="${mjc2wsl.class.dir}:${res.dir}" classname="com.quemaster.transformations.mjc2wsl.mjc2wsl">
+        <java classpath="${mjc2wsl.class.dir}:${res.dir}" classname="${mjc2wsl.main}">
             <arg line="${mjc2wsl.options}" />
             <arg value="${filename}" />
         </java>
             <arg line="${mjc2wsl.options}" />
             <arg value="${filename}" />
         </java>
 
         <antcall target="wsl-run">
             <param name="filename" value="${transf.wsl.file}" />
 
         <antcall target="wsl-run">
             <param name="filename" value="${transf.wsl.file}" />
-            <param name="args" value="${transf.filename}" />
+            <param name="args" value="${transf.wsl.args} ${transf.filename}" />
         </antcall>
     </target>
 
         </antcall>
     </target>
 
             <path>
             <fileset dir='${samples.temp.dir}'>
                 <patternset refid="non.transformed.sources"/>
             <path>
             <fileset dir='${samples.temp.dir}'>
                 <patternset refid="non.transformed.sources"/>
+                <depth max="0"/>
             </fileset>
             </path>
         </foreach>
             </fileset>
             </path>
         </foreach>
 
     <target name="output-all-versions"
         description="generate variations on the translations in the 'local' folder and tar them">
 
     <target name="output-all-versions"
         description="generate variations on the translations in the 'local' folder and tar them">
+        <delete>
+                <fileset dir="local/out/"/>
+        </delete>
+        <mkdir dir="local/out"/>
         <antcall>
             <target name="mj-samples"/>
             <target name="mjc2wsl-samples"/>
         <antcall>
             <target name="mj-samples"/>
             <target name="mjc2wsl-samples"/>
             <param name="samples.temp.dir" value="local/out/popPush-glob"/>
             <param name="mjc2wsl.options" value="--genPopPush --genGlobalVars"/>
         </antcall>
             <param name="samples.temp.dir" value="local/out/popPush-glob"/>
             <param name="mjc2wsl.options" value="--genPopPush --genGlobalVars"/>
         </antcall>
+        <antcall>
+            <target name="mj-samples"/>
+            <target name="mjc2wsl-samples"/>
+            <param name="samples.temp.dir" value="local/out/popPush-loc-separate"/>
+            <param name="mjc2wsl.options" value="--genPopPush --genInlinePrint --genLocalsSeparate --genLocalVars"/>
+        </antcall>
         <tar basedir="local/out" compression="gzip"
             destfile="local/mjc2wsl-samples.tgz"
             includes="*/*.wsl"/>
         <tar basedir="local/out" compression="gzip"
             destfile="local/mjc2wsl-samples.tgz"
             includes="*/*.wsl"/>
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner