minor change to demand points-to interface
[wala.git] / com.ibm.wala.shrike / build.xml
blob210d36d63b0f14b83bcab6a60af05c69fce68115
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <project name="com.ibm.wala.shrike" default="build.jars" basedir=".">\r
3 \r
4         <property name="basews" value="${ws}"/>\r
5         <property name="baseos" value="${os}"/>\r
6         <property name="basearch" value="${arch}"/>\r
7         <property name="basenl" value="${nl}"/>\r
8         <property name="bundleId" value="com.ibm.wala.shrike"/>\r
9         <property name="bundleVersion" value="1.0.0"/>\r
11         <!-- Compiler settings. -->\r
12         <property name="javacFailOnError" value="true"/>\r
13         <property name="javacDebugInfo" value="on"/>\r
14         <property name="javacVerbose" value="false"/>\r
15         <property name="logExtension" value=".log"/>\r
16         <property name="compilerArg" value=""/>\r
17         <property name="javacSource" value="1.5"/>\r
18         <property name="javacTarget" value="1.5"/>\r
19         <condition property="dir_bootclasspath" value="${java.home}/../Classes">\r
20                 <os family="mac"/>\r
21         </condition>\r
22         <property name="dir_bootclasspath" value="${java.home}/lib"/>\r
23         <path id="path_bootclasspath">\r
24                 <fileset dir="${dir_bootclasspath}">\r
25                         <include name="*.jar"/>\r
26                 </fileset>\r
27         </path>\r
28         <property name="bootclasspath" refid="path_bootclasspath"/>\r
29         <property name="bundleJavacSource" value="${javacSource}"/>\r
30         <property name="bundleJavacTarget" value="${javacTarget}"/>\r
31         <property name="bundleBootClasspath" value="${bootclasspath}"/>\r
33         <target name="init" depends="properties">\r
34                 <condition property="pluginTemp" value="${buildTempFolder}/plugins">\r
35                         <isset property="buildTempFolder"/>\r
36                 </condition>\r
37                 <property name="pluginTemp" value="${basedir}"/>\r
38                 <condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.shrike_1.0.0">\r
39                         <isset property="buildTempFolder"/>\r
40                 </condition>\r
41                 <property name="build.result.folder" value="${basedir}"/>\r
42                 <property name="temp.folder" value="${basedir}/temp.folder"/>\r
43                 <property name="plugin.destination" value="${basedir}"/>\r
44         </target>\r
46         <target name="properties" if="eclipse.running">\r
47                 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>\r
49         </target>\r
51         <target name="build.update.jar" depends="init" description="Build the plug-in: com.ibm.wala.shrike for an update site.">\r
52                 <delete dir="${temp.folder}"/>\r
53                 <mkdir dir="${temp.folder}"/>\r
54                 <antcall target="build.jars"/>\r
55                 <antcall target="gather.bin.parts">\r
56                         <param name="destination.temp.folder" value="${temp.folder}/"/>\r
57                 </antcall>\r
58                 <jar destfile="${plugin.destination}/com.ibm.wala.shrike_1.0.0.jar" basedir="${temp.folder}/com.ibm.wala.shrike_1.0.0" filesetmanifest="merge"/>\r
59                 <delete dir="${temp.folder}"/>\r
60         </target>\r
62         <target name="@dot" depends="init" unless="@dot" description="Create jar: com.ibm.wala.shrike @dot.">\r
63                 <delete dir="${temp.folder}/@dot.bin"/>\r
64                 <mkdir dir="${temp.folder}/@dot.bin"/>\r
65                 <path id="@dot.classpath">\r
66                 </path>\r
67                 <!-- compile the source code -->\r
68                 <javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}"                >\r
69                         <compilerarg line="${compilerArg}" compiler="${build.compiler}"/>\r
70                         <classpath refid="@dot.classpath" />\r
71                         <src path="src/"                        />\r
72                         <exclude name="**/bak/"/>\r
73                         <compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>\r
74                 </javac>\r
75                 <!-- Copy necessary resources -->\r
76                 <copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">\r
77                         <fileset dir="src/">\r
78                                 <exclude name="**/*.java"/>\r
79                                 <exclude name="**/package.htm*"/>\r
80                         </fileset>\r
81                 </copy>\r
82                 <mkdir dir="${build.result.folder}"/>\r
83                 <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">\r
84                         <fileset dir="${temp.folder}/@dot.bin">\r
85                         </fileset>\r
86                 </copy>\r
87                 <delete dir="${temp.folder}/@dot.bin"/>\r
88         </target>\r
90         <target name="src.zip" depends="init" unless="src.zip">\r
91                 <mkdir dir="${build.result.folder}"/>\r
92                 <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">\r
93                         <fileset dir="src/">\r
94                                 <include name="**/*.java"/>\r
95                         </fileset>\r
96                 </zip>\r
97         </target>\r
99         <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: com.ibm.wala.shrike.">\r
100                 <available property="@dot" file="${build.result.folder}/@dot"/>\r
101                 <antcall target="@dot"/>\r
102         </target>\r
104         <target name="build.sources" depends="init">\r
105                 <available property="src.zip" file="${build.result.folder}/src.zip"/>\r
106                 <antcall target="src.zip"/>\r
107         </target>\r
109         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">\r
110                 <mkdir dir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0"/>\r
111                 <copy todir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0" failonerror="true" overwrite="false">\r
112                         <fileset dir="${build.result.folder}/@dot">\r
113                                 <include name="**"/>\r
114                         </fileset>\r
115                 </copy>\r
116                 <copy todir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0" failonerror="true" overwrite="false">\r
117                         <fileset dir="${basedir}">\r
118                                 <include name="META-INF/"/>\r
119                         </fileset>\r
120                 </copy>\r
121         </target>\r
123         <target name="build.zips" depends="init">\r
124         </target>\r
126         <target name="gather.sources" depends="init" if="destination.temp.folder">\r
127                 <mkdir dir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0"/>\r
128                 <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0" failonerror="false" overwrite="false"/>\r
129         </target>\r
131         <target name="gather.logs" depends="init" if="destination.temp.folder">\r
132                 <mkdir dir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0"/>\r
133                 <copy todir="${destination.temp.folder}/com.ibm.wala.shrike_1.0.0" failonerror="false" overwrite="false">\r
134                         <fileset dir="${temp.folder}">\r
135                                 <include name="@dot.bin${logExtension}"/>\r
136                         </fileset>\r
137                 </copy>\r
138         </target>\r
140         <target name="clean" depends="init" description="Clean the plug-in: com.ibm.wala.shrike of all the zips, jars and logs created.">\r
141                 <delete dir="${build.result.folder}/@dot"/>\r
142                 <delete file="${build.result.folder}/src.zip"/>\r
143                 <delete file="${plugin.destination}/com.ibm.wala.shrike_1.0.0.jar"/>\r
144                 <delete file="${plugin.destination}/com.ibm.wala.shrike_1.0.0.zip"/>\r
145                 <delete dir="${temp.folder}"/>\r
146         </target>\r
148         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">\r
149                 <eclipse.convertPath fileSystemPath="C:/Data/Projects/Safe/workspaces/safe-build/com.ibm.wala.shrike" property="resourcePath"/>\r
150                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>\r
151         </target>\r
153         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: com.ibm.wala.shrike.">\r
154                 <delete dir="${temp.folder}"/>\r
155                 <mkdir dir="${temp.folder}"/>\r
156                 <antcall target="build.jars"/>\r
157                 <antcall target="build.sources"/>\r
158                 <antcall target="gather.bin.parts">\r
159                         <param name="destination.temp.folder" value="${temp.folder}/"/>\r
160                 </antcall>\r
161                 <antcall target="gather.sources">\r
162                         <param name="destination.temp.folder" value="${temp.folder}/"/>\r
163                 </antcall>\r
164                 <delete>\r
165                         <fileset dir="${temp.folder}">\r
166                                 <include name="**/*.bin${logExtension}"/>\r
167                         </fileset>\r
168                 </delete>\r
169                 <zip destfile="${plugin.destination}/com.ibm.wala.shrike_1.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>\r
170                 <delete dir="${temp.folder}"/>\r
171         </target>\r
173 </project>\r