Line # Revision Author
1 586 jcostell <?xml version="1.0"?>
2
3 <!--
4 ~ Copyright (c) 2001-2007, TIBCO Software Inc.
5 ~ Use, modification, and distribution subject to terms of license.
6 -->
7
8 <project name="TIBCO General Interface Performance Profiler" default="dist" basedir=".">
9
10 <property name="project.dir" value="."/>
11
12 <target name="init">
13 <!-- Load the application specific settings -->
14 <property file="build.properties"/>
15
16 <filterset id="filters-dependent">
17 <filter token="gi.apidocs.title" value="${gi.apidocs.title}"/>
18 <filter token="gi.apidocs.title.esc" value="${gi.apidocs.title.esc}"/>
19 </filterset>
20 <filterset id="filters">
21 <filtersfile file="build.properties"/>
22 </filterset>
23
24 <!-- Convert prop={true,false} to set/unset properties for use with if/unless. -->
25 <condition property="build.set.samples" value="1">
26 <equals arg1="${gipp.dist.sampleprojects}" arg2="true"/>
27 </condition>
28 <condition property="build.set.obfuscate" value="1">
29 <equals arg1="${gipp.dist.obfuscate}" arg2="true"/>
30 </condition>
31
32 <path id="cp.tools">
33 <path path="${gi.tools.dir}/jsx-tools.jar"/>
34 <path path="${gi.tools.dir}/${lib.jaxen}"/>
35 <path path="${gi.tools.dir}/${lib.rhino}"/>
36 <path path="${gi.tools.dir}/${lib.xalan}"/>
37 <path path="${gi.tools.dir}/${lib.xerces}"/>
38 <path path="${gi.tools.dir}/${lib.jsparser}"/>
39 <path path="${gi.tools.dir}/${lib.saxon}"/>
40 <path path="${gi.tools.dir}/${lib.saxon-dom}"/>
41 </path>
42
43 <taskdef resource="com/tibco/gi/ant/antlib.xml" classpathref="cp.tools"/>
44
45 </target>
46
47 <target name="dist"
48 depends="init, copy-gipp, copy-samples, doc, obfuscate"
49 description="Builds a distribution of TIBCO General Interface Performance Profiler."/>
50
51 <target name="copy-gipp" depends="init">
52 <mkdir dir="${gipp.dist.dir}"/>
53
54 <copy todir="${gipp.dist.dir}">
55 <fileset dir="${project.dir}" includes="${gipp.rsrc.toplevel}"/>
56 </copy>
57 </target>
58
59 <target name="copy-samples" depends="init" if="build.set.samples">
60 <copy todir="${gipp.dist.dir}">
61 <fileset dir="${project.dir}" includes="${gipp.rsrc.toplevel.sampleprojects}"/>
62 </copy>
63 </target>
64
65 <target name="obfuscate" depends="init" if="build.set.obfuscate">
66 <gi-obfuscate optliterals="true">
67 <fileset dir="${gipp.dist.dir}">
68 <include name="gipp.js"/>
69 </fileset>
70 </gi-obfuscate>
71 </target>
72
73 <target name="doc" depends="init" description="Compiles the API documentation.">
74 <mkdir dir="${gipp.dist.api}"/>
75
76 <gi-doc destdir="${gipp.dist.api}/xml" access="${gipp.docs.access}">
77 <fileset dir="${project.dir}" includes="gipp.js"/>
78 </gi-doc>
79
80 <mkdir dir="${tmp.dir}"/>
81
82 <!-- Copy XSLT to temporary directory with filtering. -->
83 <copy todir="${tmp.dir}" verbose="false" encoding="${build.encoding}">
84 <filterset refid="filters-dependent"/>
85 <filterset refid="filters"/>
86
87 <fileset dir="${gi.apidoc.dir}">
88 <include name="*.xsl"/>
89 <include name="*.html"/>
90 <include name="*.css"/>
91 </fileset>
92 </copy>
93
94 <gi-htmldoc
95 srcdir="${gipp.dist.api}/xml"
96 destdir="${gipp.dist.api}/html"
97 docdir="${tmp.dir}"/>
98
99 <delete dir="${tmp.dir}"/>
100 </target>
101
102 <target name="zip" depends="dist" description="Packages the distribution in a ZIP file.">
103 <zip
104 basedir="${gipp.dist.dir}"
105 includes="**/*"
106 destfile="${gipp.build.dir}/${gipp.dist.zip}"/>
107 </target>
108
109 <target name="clean" depends="init"
110 description="Removes all build artifacts.">
111 <delete dir="${gipp.build.dir}"/>
112 </target>
113
114 </project>