-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
80 lines (70 loc) · 2.49 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
<?xml version="1.0"?>
<project name="CIRP" default="build">
<property name="distdir" location="dist"/>
<property name="tempdir" location="tmp"/>
<property name="tidy.sh" location="bin/tidy.sh"/>
<path id="classpath.xslt">
<pathelement location="lib/saxon7.jar"/>
</path>
<target name="build" depends="copy-static, make-news" />
<target name="copy-static">
<mkdir dir="${distdir}"/>
<copy todir="${distdir}" preservelastmodified="true"
verbose="true" overwrite="false">
<fileset dir="web">
<!-- Exclude all XML source files such as News index.xml etc. -->
<exclude name="**/*.xml"/>
<!-- TODO: Use a different extension for those files -->
<exclude name="**/*~"/>
<exclude name="**/*.htm"/>
<exclude name="**/*.bak"/>
<exclude name="**/*.CKP"/>
<exclude name="**/d"/>
<exclude name="**/i"/>
<exclude name="**/x"/>
<exclude name="**/index0.html"/>
<exclude name="**/index2.html"/>
<exclude name="**/*.desc"/>
<exclude name="**/*.pgp"/>
<exclude name="**/*.orig"/>
<exclude name="**/*.rej"/>
<exclude name="**/*.old"/>
<exclude name="**/*.marks"/>
<exclude name="**/.nfs*"/>
<exclude name="**/.xvpics"/>
<exclude name="**/TODO"/>
<exclude name="**/*.tmp"/>
</fileset>
</copy>
</target>
<target name="-check-news-uptodate">
<uptodate property="news.uptodate" targetfile="${distdir}/news/index.html">
<srcfiles dir="src/news" includes="*.xml"/>
</uptodate>
</target>
<target name="make-news" depends="-check-news-uptodate" unless="news.uptodate">
<dependset>
<srcfilelist dir="src/news" files="*.xml"/>
<targetfilelist dir="${distdir}/news" files="index.html"/>
</dependset>
<xslt style="news.xsl" processor="trax" basedir="src/news"
includes="index.xml" destdir="${distdir}/news">
<classpath refid="classpath.xslt"/>
</xslt>
<!-- tidy the file - ->
<exec executable="${tidy.sh}" dir="${distdir}/news"
input="${tempdir}/index.html"
output="${distdir}/news/index.html"
failonerror="true"
errorproperty="tidy.errors"/>
<echo message="${tidy.errors}"/>
-->
</target>
<target name="clean">
<delete dir="${tempdir}"/>
</target>
<!-- Warning: distclean will remove the main upload directory! -->
<target name="distclean" depends="clean">
<delete dir="${distdir}"/>
</target>
</project>