File: build.xml

package info (click to toggle)
tcode 0.1.20080918-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 440 kB
  • sloc: perl: 831; xml: 84; sh: 37; csh: 16; makefile: 13
file content (108 lines) | stat: -rw-r--r-- 4,055 bytes parent folder | download | duplicates (2)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<project name="tcode" default="lib">
<description>
   Tools for documenting Java programs in LaTeX
</description>

<property file="tcode.properties"/>
<property name="tcode.version" value="1.0 Beta"/>

<target name="build" description="Builds the Ant tasks for TCode">
   <mkdir dir="build"/>
   <tstamp/>
   <!-- Cannot use Texjava task because it is not constructed yet -->
   <echo message="Building the Texjava task"/>
   <exec executable="perl" failonerror="yes">
      <arg file="${texjava.texjava}"/>
      <arg value="-master"/>
      <arg file="tcode.tex"/>
      <arg value="-nohtml"/>
      <arg file="Texjava.tex"/>
      <arg file="Texjava.java"/>
   </exec>
   <!-- Normally, we should put Texjava.java in umontreal/iro/lecuyer/tcode
         subdirectory for proper dependency checking.
         Since there is only a few task, we can afford recompiling
         them every time and unclutter the tree. -->
   <javac srcdir="." destdir="build" includes="Texjava.java"/>
   <echo message="Building the PdfLatex task"/>
   <exec executable="perl" failonerror="yes">
      <arg file="${texjava.texjava}"/>
      <arg value="-master"/>
      <arg file="tcode.tex"/>
      <arg value="-nohtml"/>
      <arg file="PdfLatex.tex"/>
      <arg file="PdfLatex.java"/>
   </exec>
   <javac srcdir="." destdir="build" includes="PdfLatex.java"/>
</target>

<target name="lib" depends="build" description="Builds the tcode Ant tasks .jar file">
   <manifest file="manifest">
      <section name="umontreal.iro.lecuyer.tcode">
         <attribute name="Specification-Title" value="Tools for documenting Java programs in Latex"/>
         <attribute name="Specification-Version" value="${tcode.version}"/>
         <attribute name="Specification-Vendor" value="DIRO of Université de Montréal"/>
         <attribute name="Implementation-Title" value="TCode"/>
         <attribute name="Implementation-Version" value="${tcode.version} ${TODAY}"/>
         <attribute name="Implementation-Vendor" value="DIRO of Université de Montréal"/>
      </section>
   </manifest>
   <jar jarfile="tcode.jar" basedir="build" manifest="manifest"/>
   <delete file="manifest"/>
</target>

<target name="doc" if="tcode.doc"
    description="Creates the PDF documentation for TCode. This target requires LaTeX and the Pierre L'Ecuyer's .sty files to be installed.">
   <delete>
      <fileset dir="." includes="*.aux"/>
   </delete>
   <exec executable="pdflatex">
      <arg value="-interaction"/>
      <arg value="nonstopmode"/>
      <arg file="tcode.tex"/>
   </exec>
<!--
   <exec executable="bibtex">
      <arg value="tcode"/>
   </exec>
   <exec executable="pdflatex">
      <arg value="-interaction"/>
      <arg value="nonstopmode"/>
      <arg file="tcode.tex"/>
   </exec>
-->
   <exec executable="pdflatex">
      <arg value="-interaction"/>
      <arg value="nonstopmode"/>
      <arg file="tcode.tex"/>
   </exec>
</target>

<target name="dist" depends="build,doc" description="Creates the TCode distribution">
   <zip destfile="tcode-${DSTAMP}.zip">
      <zipfileset dir="." prefix="tcode" includes="*.tex,*.pdf,*.sty,tcode.bbl"/>
      <zipfileset dir="." prefix="tcode" includes="setl2hinit.pl,texjava.pl,javatex.pl,*.perl"/>
      <zipfileset dir="." prefix="tcode" includes="tcode.jar"/>
      <zipfileset dir="." prefix="tcode" includes="Tcoderc" filemode="755"/>
      <zipfileset dir="." prefix="tcode" includes="Tcode.sh" filemode="755"/>
      <zipfileset dir="." prefix="tcode" includes="Tcode.bat"/>
      <zipfileset dir="." prefix="tcode" includes="tcode.properties,build.xml,README"/>
   </zip>
</target>

<target name="cleanbuild" description="Cleans the build directory">
   <delete dir="build"/>
</target>

<target name="cleanlib" description="Cleans the library tcode.jar">
   <delete file="tcode.jar"/>
</target>

<target name="cleandoc" description="Cleans the documentation">
   <delete>
      <fileset dir="." includes="*.aux"/>
      <fileset dir="." includes="*.toc,*.blg,*.dvi,*.log,*.out"/>
   </delete>
</target>

</project>