gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
ant build - new task to run a transf on a single file; minor updates to the propertie...
authorDoni Pracner <quinnuendo@gmail.com>
Mon, 11 Nov 2013 23:28:27 +0000 (00:28 +0100)
committerDoni Pracner <quinnuendo@gmail.com>
Mon, 11 Nov 2013 23:28:27 +0000 (00:28 +0100)
build.xml
src-wsl/transf-min.wsl

index af75d0462da6867d970e8527a6da238623927fcf..854816a7c586f11b4fac9551fdf2ba6c1143960d 100644 (file)
--- a/build.xml
+++ b/build.xml
     
     <property name="fermat.dir" value="/home/donny/d/donny/fermat3" />
 
+    <property name="transf.wsl.file" value="src-wsl/transf-min.wsl" />
+    <property name="transf.wsl.ini" value="transf.ini" />
+
     <description>
         Builder script for mjc2wsl and related tools, runs test
         on given samples.
+        
+        Also gives options to chain the tools on individual files.
     </description>
-    
+
     <target name="init">
         <mkdir dir="${mjc2wsl.class.dir}"/>
         <mkdir dir="${compiler.class.dir}"/>
@@ -94,7 +99,7 @@
     </target>
     
     <target name="wsl-run" >
-        <exec executable="${fermat.dir}/bin/wsl" >
+        <exec executable="${fermat.dir}/bin/wsl" inputstring="${inputstring}">
             <env key="PATH" path="${env.PATH}:${fermat.dir}/bin"/>
             <env key="FermaT" path="${fermat.dir}" />
             <env key="SCHEME_LIBRARY_PATH" path="${fermat.dir}/slib/" />
         </exec>
     </target>
     
-    <target name="wsl-transf" depends="make-transf-ini"
+    <target name="wsl-transf" 
+        description="transform (simplify) a single wsl file generated by mjc2wsl">
+        <delete file="${transf.wsl.ini}"/>
+        
+        <antcall target="wsl-run">
+            <param name="filename" value="${transf.wsl.file}" />
+            <param name="inputstring" value="${transf.filename}" />
+        </antcall>
+    </target>
+    
+    <target name="wsl-transf-samples" depends="make-transf-ini-samples"
         description="transform (simplify) the wsl files generated by mjc2wsl">
         <antcall target="wsl-run">
-            <param name="filename" value="src-wsl/transf-min.wsl" />
+            <param name="filename" value="${transf.wsl.file}" />
         </antcall>
     </target>
     
-    <target name="make-transf-ini">
+    <target name="make-transf-ini-samples">
         <fileset dir="${samples.temp.dir}" casesensitive="no" id="generated-wsl-fileset">
-                <patternset id="non.test.sources">
+                <patternset id="non.transformed.sources">
                     <include name="**/*.wsl"/>
                     <exclude name="**/*_t.wsl"/>
                 </patternset>
         <pathconvert pathsep="${line.separator}" 
             property="generated-wsl-files" refid="generated-wsl-fileset" />
 
-        <echo file="transf.ini">${generated-wsl-files}</echo>
+        <echo file="${transf.wsl.ini}">${generated-wsl-files}</echo>
     </target>
     
-    <target name="all" depends='mj-samples,mjc2wsl-samples
+    <target name="all" depends='mj-samples,mjc2wsl-samples,wsl-transf-samples'
         description="build the tools, run them on the samples to check">
     
     </target>
index 7437909bacdbbce7d88d999f0aa6c3a5515441fb..629e91bbf955c5a438c114bbedc1d4fb2b5f049d 100755 (executable)
@@ -78,7 +78,7 @@ IF @File_Exists?(inifilename) THEN
        OD;
        @Close_Input_Port(inifile);
 ELSE
-    PRINT("ini file (",inifile,") not found.",
+    PRINT("ini file (",inifilename,") not found.",
     " it should contain a list of filenames to be converted");
     PRINT("you can input a filename now:");
     filename := @Read_Line(Standard_Input_Port);
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner