Skip to content

Commit

Permalink
build.xml: Use <macrodef> to make JARs of the demo programs
Browse files Browse the repository at this point in the history
  • Loading branch information
Larhzu committed Jul 29, 2024
1 parent 39b7371 commit d18a12a
Showing 1 changed file with 22 additions and 69 deletions.
91 changes: 22 additions & 69 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,75 +99,28 @@
</manifest>
</jar>

<jar destfile="${jar_dir}/TestAllocSpeed.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="TestAllocSpeed.class">
<manifest>
<attribute name="Main-Class" value="TestAllocSpeed"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/XZEncDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="XZEncDemo.class">
<manifest>
<attribute name="Main-Class" value="XZEncDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/XZDecDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="XZDecDemo.class">
<manifest>
<attribute name="Main-Class" value="XZDecDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/XZSeekEncDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="XZSeekEncDemo.class">
<manifest>
<attribute name="Main-Class" value="XZSeekEncDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/XZSeekDecDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="XZSeekDecDemo.class">
<manifest>
<attribute name="Main-Class" value="XZSeekDecDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/LZMAEncDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="LZMAEncDemo.class">
<manifest>
<attribute name="Main-Class" value="LZMAEncDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>

<jar destfile="${jar_dir}/LZMADecDemo.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="LZMADecDemo.class">
<manifest>
<attribute name="Main-Class" value="LZMADecDemo"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>
<macrodef name="jar.program">
<attribute name="name"/>
<sequential>
<jar destfile="${jar_dir}/@{name}.jar"
modificationtime="${timestamp}"
basedir="${classes_dir}"
includes="@{name}.class">
<manifest>
<attribute name="Main-Class" value="@{name}"/>
<attribute name="Class-Path" value="xz.jar"/>
</manifest>
</jar>
</sequential>
</macrodef>

<jar.program name="TestAllocSpeed"/>
<jar.program name="XZEncDemo"/>
<jar.program name="XZDecDemo"/>
<jar.program name="XZSeekEncDemo"/>
<jar.program name="XZSeekDecDemo"/>
<jar.program name="LZMAEncDemo"/>
<jar.program name="LZMADecDemo"/>
</target>

<target name="pom" description="Creates xz.pom for a Maven repository">
Expand Down

0 comments on commit d18a12a

Please sign in to comment.