#!/bin/sh /usr/share/dpatch/dpatch-run
## build-remove-hardcoded.patch by <ubuntu@phihag.de>
##
## DP: Remove hardcoded paths from build.xml.
## DP: Create a manifest in the resulting jar file to set the Compiler class as main class.
## DP: Correct indenting
@DPATCH@
--- /build.xml 2007-06-03 14:15:03.000000000 +0200
+++ /build.xml 2007-05-18 23:14:10.000000000 +0200
@@ -35,23 +35,23 @@
<project name="Janino" default="compile" basedir=".">
<description>
Build file for the Janino project
- </description>
-
+ </description>
+
<property file="build.properties"/>
+ <property name="janino.manifest" value="janino.manifest"/>
-
+
<target name="compile" description="Compile the source">
<mkdir dir="build/classes"/>
-
+
<javac
fork="yes"
- executable="${jdk_1_2_2_home}/bin/javac"
srcdir="src" excludes="org/codehaus/janino/AstGeneratorVisitor.java"
destdir="build/classes"
debug="true"
debuglevel="source"
/>
</target>
-
+
<target name="javadoc" description="Build JAVADOC" depends="compile">
<mkdir dir="build/javadoc"/>
<javadoc
@@ -64,15 +64,16 @@
classpath="build/classes;${ant_jar}"
destdir="build/javadoc"
packagenames="${javadoc_packages}"
- >
- <link offline="true" href="${jdk_javadoc_remote}" packagelistloc="${jdk_javadoc_local}"/>
- <link offline="true" href="${ant_javadoc_remote}" packagelistloc="${ant_javadoc_local}"/>
- </javadoc>
+ />
+ </target>
+
+ <target name="createManifest" description="Create a manifest file for the resulting jar">
+ <echo file="${janino.manifest}" append="false" message="Manifest-Version: 1.0${line.separator}Main-Class: org.codehaus.janino.Compiler${line.separator}"/>
</target>
-
- <target name="jar" description="Create the janino jar." depends="compile">
+
+ <target name="jar" description="Create the janino jar." depends="compile, createManifest">
<mkdir dir="build/lib"/>
- <jar jarfile="build/lib/janino.jar" basedir="build/classes"/>
+ <jar jarfile="build/lib/janino.jar" basedir="build/classes" manifest="${janino.manifest}"/>
</target>
<target name="dist" description="Generate the distribution" depends="jar, javadoc">
@@ -84,7 +85,7 @@
<arg value="build/lib/janino.jar"/>
<arg value="dummy"/>
</exec>
-
+
<zip destfile="${janino_zip}">
<zipfileset file="build/lib/janino.jar" prefix="janino-${version}/lib"/>
<zipfileset dir="build/javadoc" prefix="janino-${version}/javadoc"/>
@@ -92,7 +93,8 @@
<zipfileset file="build.*" prefix="janino-${version}"/>
</zip>
</target>
-
+
<target name="clean" description="Clean built files.">
<delete dir="build"/>
+ <delete file="${janino.manifest}"/>
</target>