-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.xml
148 lines (131 loc) · 5.3 KB
/
build.xml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- DOCTYPE date SYSTEM "ant.dtd" -->
<project name="monq" default="compile" basedir=".">
<!-- get the following imports: https://github.com/HaraldKi/hkAntLib.git -->
<import file="../hkAntLib/util.xml"/>
<import file="../hkAntLib/javac.xml"/>
<import file="../hkAntLib/cobertura.xml"/>
<import file="../hkAntLib/junit.xml"/>
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<do-assert-var-set var="junit.jar"
text="Must be the full path of junit4.jar"/>
<description>
The MonQ library contains as its main contribution the
monq.jfa.* packages which implement fast and scalable regular
expression viz. NFA/DFA library.
</description>
<property environment="env" />
<property name="stylefile" value="src/monq/jfa/docstyle.css" />
<!-- *************************************************************** -->
<!-- these are our source files -->
<patternset id="jsrc"
excludes="monq/**/keep/** monq/**/doc-files/** monq/**/*.html"
includes="monq/**/*.java"
>
</patternset>
<!-- these are the test source files -->
<patternset id="testsrc" includes="monq/**/*.java *.java">
</patternset>
<!-- *************************************************************** -->
<!-- read current version to build from RELNOTES -->
<target name="setVersion">
<loadfile property="version" srcfile="Documentation/RELNOTES">
<!-- someone had a half decent idea with these filter chains -->
<filterchain>
<linecontainsregexp>
<regexp pattern="VERSION +[a-z]*[0-9.]+" />
</linecontainsregexp>
<headfilter lines="1" />
<striplinebreaks />
<striplinebreaks linebreaks="VERSION
 " />
</filterchain>
</loadfile>
</target>
<!-- *************************************************************** -->
<!-- Main target is to compile all source files of the packages. -->
<target name="compile" description="compile all Java source files to">
<do-javac/>
</target>
<!-- *************************************************************** -->
<target name="test-coverage" depends="compile, compile-tests">
<do-define-cobertura/>
<do-cobertura-instrument/>
<do-junit/>
<do-cobertura-report/>
</target>
<!-- *************************************************************** -->
<!-- packing a jar for the compiled distro -->
<target name="jar" depends="compile, setVersion"
description="creates the runtime library jar file">
<mkdir dir="build/sitecontent/download" />
<jar jarfile="build/sitecontent/download/monq-${version}.jar"
basedir="build/classes"
includes="monq/**">
<manifest>
<attribute name="Monq-Version" value="${version}"/>
<attribute name="Main-Class" value="monq.programs.Grep"/>
</manifest>
</jar>
</target>
<!-- *************************************************************** -->
<!-- create the documentation -->
<target name="apidoc" depends="setVersion"
description="create the API documentation in dist">
<mkdir dir="build/sitecontent/monqApiDoc"/>
<javadoc destdir="build/sitecontent/monqApiDoc"
Public="true" nodeprecated="false"
author="true" nohelp="true"
source="1.7"
Windowtitle="monq packages"
Header="monq-${version}"
Bottom="<div class="monqlink">download: <a href='https://pifpafpuf.de/Monq.jfa/download' target='_top'>pifpafpuf.de</a><br/>home page: <a href="http://pifpafpuf.de/Monq.jfa/" target='_top'>pifpafpuf.de/Monq.jfa</a></div>"
Overview="src/java/monq/overview.html"
additionalparam="-quiet"
verbose="false"
use="true"
>
<arg value="-Xdoclint:all,-missing"/>
<packageset dir="src/java">
<include name="monq/**"/>
<!-- packageset just creates package names doc-files is no package -->
<exclude name="**/doc-files"/>
</packageset>
</javadoc>
</target>
<!-- *************************************************************** -->
<target name="apidocjar" depends="apidoc"
description="jar file of the api documentation created with javadoc">
<mkdir dir="build/sitecontent/download"/>
<jar jarfile="build/sitecontent/download/monqApiDoc-${version}.jar"
basedir="build/sitecontent"
includes="monqApiDoc/**" />
</target>
<!-- *************************************************************** -->
<target name="compile-tests" depends="compile">
<do-javac-tests/>
</target>
<!-- *************************************************************** -->
<target name="cleanall">
<delete dir="build"/>
</target>
<!-- *************************************************************** -->
<!-- run pdflatex to create the tutorial -->
<target name="tutorial">
<exec dir="Documentation/Tutorial"
executable="/bin/sh"
failonerror="true"
>
<arg line="maketut"/>
</exec>
<mkdir dir="build/sitecontent/download"/>
<copy todir="build/sitecontent/download">
<fileset dir="Documentation/Tutorial">
<include name="MonqJfaTutorial.pdf"/>
<include name="*.java"/>
</fileset>
</copy>
</target>
<!-- *************************************************************** -->
<target name="package" depends="jar, apidocjar, tutorial">
</target>
</project>