summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pax/build.xml
blob: 0a7eae3ddfc83e9e502c0807c0e596c45cf2357d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="us-ascii"?>
<project name="pax" default="dist" basedir=".">
  <description>
    Build file for PDFAnnotExtractor
  </description>

  <property name="src"   location="src"/>
  <property name="build" location="build"/>
  <property name="dist"  location="../scripts/"/>
  <property name="pdfbox.home" location="${basedir}"/> <!-- or somewhere else -->

  <target name="init">
    <mkdir dir="${build}"/>
  </target>

  <target name="compile"
	  depends="init"
	  description="compile the source"
	  >
    <javac srcdir="${src}" destdir="${build}">
      <classpath>
	<pathelement location="${basedir}/lib/pdfbox.jar"/>
	<pathelement location="${basedir}/lib/commons-logging.jar"/>
      </classpath>
    </javac>
  </target>

  <path id="build.classpath">
    <fileset dir="${basedir}">
      <include name="lib/*.jar"/>
    </fileset>
  </path>

  <pathconvert property="manifest.classpath" pathsep=" ">
    <path refid="build.classpath"/>
    <mapper>
      <chainedmapper>
	<flattenmapper/>
	<globmapper from="*.jar" to="lib/*.jar"/>
      </chainedmapper>
    </mapper>
  </pathconvert>

  <target name="distctan"
	  depends="compile"
	  description="generate the distribution ctan"
	  >
    <mkdir dir="${dist}"/>
    <jar jarfile="${dist}/${ant.project.name}.jar"
	 manifest="${src}/MANIFEST.MF"
	 basedir="${build}"
	 includes="pax/**" >
    <zipgroupfileset dir="lib" includes="*.jar"/>
    </jar>
  </target>
  
  <target name="dist"
	  depends="compile"
	  description="generate the distribution"
	  >
    <mkdir dir="${dist}"/>
    <mkdir dir="${dist}/lib"/>
    <copy todir="${dist}/lib" flatten="true">
      <fileset dir="lib">
	<include name="*.jar" />
      </fileset>
    </copy>
    <jar jarfile="${dist}/${ant.project.name}.jar"
	 manifest="${src}/MANIFEST.MF"
	 basedir="${build}"
	 includes="pax/**" >
      <manifest>
	<attribute name="Class-Path" value="${manifest.classpath}" />
      </manifest>
    </jar>
  </target>


  <target name="clean"
	  description="clean up"
	  >
    <delete dir="${build}"/>
    <delete dir="${dist}/lib"/>
    <delete file="${dist}/pax.jar" />
  </target>

</project>