|
1 <project name="com.symbian.dbms" default="all" basedir="../"> |
|
2 |
|
3 <!--properties...--> |
|
4 <!-- The epoc.build property specifies the temp location for build files |
|
5 In the TCL build this will have been specified as a unique location |
|
6 and so this value will be ignored. |
|
7 NOTE: Do not use this directly - use build.dir instead --> |
|
8 <property name="epoc.build" value="${basedir}"/> |
|
9 |
|
10 <!-- The tools.rel property specifies the releease location for binaries |
|
11 In the TCL build this will have been specified as a unique location |
|
12 and so this value will be ignored --> |
|
13 <property name="tools.rel" value="${basedir}\rel"/> |
|
14 |
|
15 <!-- Add a new level of indirection to the build to location so we can |
|
16 ensure that we can delete the directory as we don't have permission |
|
17 to delect epoc.build --> |
|
18 <property name="build.dir" value="${epoc.build}\target"/> |
|
19 |
|
20 <property name="lib.dir" location="${basedir}/../lib"/> |
|
21 <property name="testlib.dir" location="${basedir}/../lib/test"/> |
|
22 |
|
23 |
|
24 <!-- These directories will store the code coverage and junit reports--> |
|
25 <property name="reports.dir" value="${build.dir}\reports"/> |
|
26 <property name="junit.reports.dir" value="${reports.dir}\junit"/> |
|
27 |
|
28 <!-- source code directories for src and test code --> |
|
29 <property name="src.dir" value="${basedir}\java"/> |
|
30 <property name="test.src.dir" value="${basedir}\test"/> |
|
31 <property name="native.src.dir" value="${basedir}\src\native"/> |
|
32 |
|
33 <!-- destination directories for built classes --> |
|
34 <property name="app.build.dir" value="${build.dir}\application-classes"/> |
|
35 <!--<property name="jniheaders.build.dir" value="${build.dir}\dbmsjni"/>--> |
|
36 |
|
37 <property name="jniheaders.build.dir" value="${native.src.dir}\..\..\..\target\dbmsjni"/> |
|
38 |
|
39 <property name="test.build.dir" value="${build.dir}\test-classes"/> |
|
40 <property name="test.temp.dir" value="${build.dir}\test-temp"/> |
|
41 |
|
42 <!-- directory in which we construt releaseable distros --> |
|
43 <property name="dist.win.dir" value="${build.dir}\dist_win"/> |
|
44 <property name="dist.lin.dir" value="${build.dir}\dist_lin"/> |
|
45 |
|
46 <!-- directory in which we store built instrumented jars --> |
|
47 <property name="dist.inst.dir" value="${build.dir}\dist"/> |
|
48 |
|
49 <property name="jars.instr.dir" value="${build.dir}\dist_instr"/> |
|
50 |
|
51 <property name="deploy.location" value="\dbmsjdbc"/> |
|
52 <property name="deploy.location_lib" value="${deploy.location}\lib"/> |
|
53 |
|
54 <property name="jar.location" value="${epoc.rel}/"/> |
|
55 <property name="release.jar" value="${jar.location}rel/dbmsjdbc.jar"/> |
|
56 <property name="deb.jar" value="${jar.location}deb/dbmsjdbc.jar"/> |
|
57 |
|
58 <!-- log dir |
|
59 Note due to the command structure in SDB Creator we can't overwrite the |
|
60 default log dir for tests so it will still be written to the source tree--> |
|
61 |
|
62 <property name="log.dir" value="${basedir}\logs"/> |
|
63 |
|
64 <property name="jar" value="${dist.win.dir}/dbmsjdbc/lib\dbmsjdbc.jar"/> |
|
65 |
|
66 |
|
67 |
|
68 <!-- Distribution Zip --> |
|
69 <property name="dbmsjdbc.zip" location="${tools.rel}\dbmsjdbc.zip"/> |
|
70 <property name="dbmsjdbc.tar" location="${tools.rel}\dbmsjdbc.tar"/> |
|
71 <property name="dbmsjdbc.tar.gz" location="${tools.rel}\dbmsjdbc.tar.gz"/> |
|
72 |
|
73 |
|
74 <!-- Compiler settings --> |
|
75 <property name="javacFailOnError" value="true"/> |
|
76 <property name="javacDebugInfo" value="on"/> |
|
77 <property name="javacVerbose" value="false"/> |
|
78 <property name="logExtension" value=".log"/> |
|
79 <property name="compilerArg" value=""/> |
|
80 <property name="javacSource" value="1.5"/> |
|
81 <property name="javacTarget" value="1.5"/> |
|
82 |
|
83 <path id="path_bootclasspath"> |
|
84 <fileset dir="${java.home}/lib"> |
|
85 <include name="*.jar"/> |
|
86 </fileset> |
|
87 </path> |
|
88 <path id="test_classpath"> |
|
89 <fileset dir="${testlib.dir}"> |
|
90 <include name="*.jar"/> |
|
91 </fileset> |
|
92 </path> |
|
93 |
|
94 <property name="bootclasspath" refid="path_bootclasspath"/> |
|
95 <property name="bundleJavacSource" value="${javacSource}"/> |
|
96 <property name="bundleJavacTarget" value="${javacTarget}"/> |
|
97 <property name="bundleBootClasspath" value="${bootclasspath}"/> |
|
98 |
|
99 <target name="all" depends="clean, build.src, build.test, build.javah, create.jar"/> |
|
100 <target name="build.release" depends="clean, build.src, build.test, build.javah, create.jar"/> |
|
101 |
|
102 <!-- ================================= |
|
103 target: clean |
|
104 |
|
105 - This target is mandatory for the Symbian buid process. |
|
106 - Please clean up all generated files during the build proccess. |
|
107 - Used by "abld clean" and "abld reallyclean". |
|
108 ================================= --> |
|
109 <target name="clean" description="Cleans the build using abld clean"> |
|
110 <delete dir="${build.dir}"/> |
|
111 <delete failonerror="false" file="${release.jar}"/> |
|
112 <delete failonerror="false" file="${deb.jar}"/> |
|
113 <delete failonerror="false" file="${dbmsjdbc.zip}"/> |
|
114 <delete failonerror="false" file="${dbmsjdbc.tar}"/> |
|
115 <delete failonerror="false" file="${dbmsjdbc.tar.gz}"/> |
|
116 <delete dir="${jniheaders.build.dir}"/> |
|
117 <delete dir="${log.dir}"/> |
|
118 </target> |
|
119 |
|
120 <!-- This builds all the source code (exc test code) and puts it into |
|
121 ${build.dir} using the compiler settings defined above --> |
|
122 <target name="build.src" description="Build source code (excluding tests)"> |
|
123 |
|
124 <mkdir dir="${app.build.dir}"/> |
|
125 |
|
126 <!-- compile the source code --> |
|
127 <javac destdir="${app.build.dir}" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > |
|
128 <src path="${src.dir}"/> |
|
129 </javac> |
|
130 </target> |
|
131 |
|
132 <!-- Builds the test code into ${test.build.dir} --> |
|
133 <target name="build.test"> |
|
134 |
|
135 <mkdir dir="${test.build.dir}"/> |
|
136 <mkdir dir="${test.temp.dir}"/> |
|
137 |
|
138 <!-- compile the test code --> |
|
139 <javac destdir="${test.build.dir}" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" > |
|
140 <classpath> |
|
141 <path refid="test_classpath"/> |
|
142 <pathelement location="${app.build.dir}"/> |
|
143 </classpath> |
|
144 <src path="${test.src.dir}"/> |
|
145 </javac> |
|
146 </target> |
|
147 |
|
148 <target name="build.javah" description="Build JNI headers"> |
|
149 |
|
150 <mkdir dir="${jniheaders.build.dir}"/> |
|
151 |
|
152 <!-- compile the source code --> |
|
153 <javah destdir="${jniheaders.build.dir}" verbose="${javahVerbose}" bootclasspath="${bundleBootClasspath}" classpath="${app.build.dir}"> |
|
154 <class name="com.symbian.dbms.jdbc.DbmsConnection"/> |
|
155 <class name="com.symbian.dbms.jdbc.DbmsResultSet"/> |
|
156 <class name="com.symbian.dbms.jdbc.DbmsStatement"/> |
|
157 <class name="com.symbian.dbms.jdbc.DbmsDatabaseMetaData"/> |
|
158 <class name="com.symbian.store.StreamStore"/> |
|
159 <class name="com.symbian.store.StoreInputStream"/> |
|
160 <class name="com.symbian.store.StoreOutputStream"/> |
|
161 <class name="com.symbian.store.EmbeddedStore"/> |
|
162 </javah> |
|
163 </target> |
|
164 |
|
165 |
|
166 <target name="create.jar"> |
|
167 <mkdir dir="${jar.location}"/> |
|
168 <jar destfile="${release.jar}" basedir="${app.build.dir}"> |
|
169 <manifest> |
|
170 <attribute name="Class-Path" value="${jar.classpath.list}"/> |
|
171 </manifest> |
|
172 </jar> |
|
173 <jar destfile="${deb.jar}" basedir="${app.build.dir}"> |
|
174 <manifest> |
|
175 <attribute name="Class-Path" value="${jar.classpath.list}"/> |
|
176 </manifest> |
|
177 </jar> |
|
178 </target> |
|
179 |
|
180 <target name="what" description="Prints out all releasables"> |
|
181 <echo message="${release.jar}" /> |
|
182 <echo message="${deb.jar}" /> |
|
183 </target> |
|
184 |
|
185 </project> |