Commit c4e38818 authored by Dr. Michael Petter's avatar Dr. Michael Petter

completely revamped ant-based build

parent 3d0ae717
...@@ -2,20 +2,19 @@ ...@@ -2,20 +2,19 @@
<property name="etc" location="etc" /> <property name="etc" location="etc" />
<property name="bin" location="bin" /> <property name="bin" location="bin" />
<property name="lib" location="lib" /> <property name="lib" location="lib" />
<property name="src" location="src" /> <property name="src" location="src" />
<property name="java" location="java" /> <property name="java" location="src/java" />
<property name="classes" location="classes" /> <property name="flex" location="src/jflex" />
<property name="dist" location="dist" /> <property name="cup" location="src/cup" />
<property name="classes" location="target/classes" />
<property name="dist" location="target/dist" />
<!--property name="test" location="test" /--> <!--property name="test" location="test" /-->
<property name="flex" location="flex" />
<property name="cup" location="cup" />
<!-- initialize the workspace --> <!-- initialize the workspace -->
<target name="init"> <target name="init">
<tstamp /> <tstamp />
<available file="version.txt" property="version.present" /> <available file="version.txt" property="version.present" />
<touch unless:set="version.present" file="version.txt" /> <touch unless:set="version.present" file="version.txt" />
<mkdir dir="${src}" />
<mkdir dir="${java}" /> <mkdir dir="${java}" />
<mkdir dir="${classes}" /> <mkdir dir="${classes}" />
<mkdir dir="${dist}" /> <mkdir dir="${dist}" />
...@@ -46,7 +45,6 @@ ...@@ -46,7 +45,6 @@
<property environment="env" /> <property environment="env" />
<path id="libraries"> <path id="libraries">
<pathelement location="${src}" />
<fileset dir="${lib}"> <fileset dir="${lib}">
<include name="**/*.jar" /> <include name="**/*.jar" />
</fileset> </fileset>
...@@ -59,7 +57,9 @@ ...@@ -59,7 +57,9 @@
</path> </path>
<target name="clean"> <target name="clean">
<delete dir="${java}" /> <delete file="${java}/java_cup/parser.java" />
<delete file="${java}/java_cup/sym.java" />
<delete file="${java}/java_cup/Lexer.java" />
<delete dir="${classes}" /> <delete dir="${classes}" />
<delete dir="${dist}" /> <delete dir="${dist}" />
</target> </target>
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
</target> </target>
<target name="compile" depends="jflex"> <target name="compile" depends="jflex">
<copy todir="${java}"><fileset dir="${src}"></fileset></copy>
<replace file="${java}/java_cup/version.java" <replace file="${java}/java_cup/version.java"
token="+ version_str" token="+ version_str"
value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'> value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
...@@ -105,13 +104,7 @@ ...@@ -105,13 +104,7 @@
<target name="src-dist" depends="dist"> <target name="src-dist" depends="dist">
<tar longfile="gnu" destfile="${dist}/java-cup-src-11b-${cupversion}.tar.gz" compression="gzip"> <tar longfile="gnu" destfile="${dist}/java-cup-src-11b-${cupversion}.tar.gz" compression="gzip">
<tarfileset dir="${src}" username="ant" group="ant" prefix="src/"> <tarfileset dir="${src}" username="ant" group="ant" prefix="src">
<include name="**"/>
</tarfileset>
<tarfileset dir="${cup}" username="ant" group="ant" prefix="cup/">
<include name="**"/>
</tarfileset>
<tarfileset dir="${flex}" username="ant" group="ant" prefix="flex/">
<include name="**"/> <include name="**"/>
</tarfileset> </tarfileset>
<tarfileset dir="${bin}" username="ant" group="ant" prefix="bin/"> <tarfileset dir="${bin}" username="ant" group="ant" prefix="bin/">
...@@ -127,13 +120,6 @@ ...@@ -127,13 +120,6 @@
</tar> </tar>
</target> </target>
<target name="test" depends="dist">
<java jar="${dist}/java-cup-11b.jar" fork="true">
<arg value="-interface" />
<arg value="${cup}/parser.cup" />
</java>
</target>
<target name="versionbump" depends="init"> <target name="versionbump" depends="init">
<echo message="${DSTAMP}" file="version.txt" /> <echo message="${DSTAMP}" file="version.txt" />
</target> </target>
...@@ -154,5 +140,4 @@ ...@@ -154,5 +140,4 @@
<echo message=" scp to deploy relase to homepage" /> <echo message=" scp to deploy relase to homepage" />
<echo message=" versionbump to inc release" /> <echo message=" versionbump to inc release" />
</target> </target>
</project> </project>
...@@ -40,7 +40,7 @@ public class version { ...@@ -40,7 +40,7 @@ public class version {
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/** Full title of the system */ /** Full title of the system */
public static final String title_str = "CUP " + version_str; public static final String title_str = "CUP " + "v0.11b 20160615 (GIT 3d0ae71)";
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/ /*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment