4
4
<property environment =" env" />
5
5
6
6
<property name =" c-src.dir" value =" ${ basedir } /src" />
7
- <property name =" c-php-tests.dir" value =" ${ basedir } /src/tests" />
7
+ <property name =" c-php-tests.dir" value =" ${ basedir } /src/tests" />
8
8
<property name =" c-build.dir" value =" ${ basedir } /build" />
9
9
<property name =" c-target.dir" value =" ${ basedir } /target" />
10
10
<property name =" c-pecl.dir" value =" ${ basedir } /pecl" />
11
11
12
12
<property file =" ${ user.home } /build.properties" />
13
13
<property file =" ${ basedir } /build.properties" />
14
14
<property file =" ${ basedir } /build.default.properties" />
15
- <property file =" ${ basedir } /build.${ os.family } .properties" />
15
+ <property file =" ${ basedir } /build.${ os.name } .properties" />
16
16
17
17
<!-- ==================================================================== -->
18
18
<!-- Cleans the directories with the generated source files -->
61
61
</filterchain >
62
62
</copy >
63
63
</target >
64
-
64
+
65
65
<!-- ==================================================================== -->
66
66
<!-- Copies the sources to the deploy directory -->
67
67
<!-- ==================================================================== -->
156
156
<target name =" get-xdebug-src" depends =" check-xdebug-src-present" unless =" ${ xdebug-src.present } " description =" Get PECL xdebug source package by given version number" >
157
157
<get src =" http://pecl.php.net/get/xdebug-${ xdebug.version } .tgz" dest =" /tmp/xdebug-${ xdebug.version } .tgz" />
158
158
</target >
159
-
159
+
160
160
<!-- ==================================================================== -->
161
161
<!-- Prepares the PHP sources for the runtime -->
162
162
<!-- ==================================================================== -->
163
163
<target name =" prepare-source" depends =" prepare" description =" Prepares the PHP sources for the runtime." >
164
- <delete dir =" ${ c-build.dir } /php-{php.version}" includeemptydirs =" true" quiet =" false" verbose =" false" failonerror =" false" />
165
-
166
- <!-- prepare PHP sources -->
164
+ <delete dir =" ${ c-build.dir } /php-{php.version}" includeemptydirs =" true" quiet =" false" verbose =" false" failonerror =" false" />
165
+
166
+ <!-- prepare PHP sources -->
167
167
<antcall target =" get-php-src" />
168
168
<untar src =" /tmp/php-${ php.version } .tar.gz" dest =" ${ c-build.dir } " compression =" gzip" />
169
169
<chmod perm =" 755" >
170
170
<fileset dir =" ${ c-build.dir } /php-${ php.version } /build" >
171
171
<include name =" **/*" />
172
172
</fileset >
173
173
</chmod >
174
-
175
- <!-- recreate symlink -->
176
- <symlink link =" ${ c-build.dir } /php" action =" delete" />
177
- <symlink link =" ${ c-build.dir } /php" resource =" ${ c-build.dir } /php-${ php.version } " />
174
+
175
+ <!-- recreate symlink -->
176
+ <symlink link =" ${ c-build.dir } /php" action =" delete" />
177
+ <symlink link =" ${ c-build.dir } /php" resource =" ${ c-build.dir } /php-${ php.version } " />
178
178
179
179
<antcall target =" get-pthreads-src" />
180
180
<untar src =" /tmp/pthreads-${ pthreads.version } .tgz" dest =" /tmp" compression =" gzip" />
181
181
<move todir =" ${ c-build.dir } /php/ext/pthreads" >
182
182
<fileset dir =" /tmp/pthreads-${ pthreads.version } " />
183
183
</move >
184
-
185
- <!-- activate to fetch pthreads head instead of given version in properties file
184
+
185
+ <!-- activate to fetch pthreads head instead of given version in properties file
186
186
<exec executable="git" dir="${c-build.dir}/php/ext">
187
187
<arg line="clone https://github.com/krakjoe/pthreads.git"/>
188
188
</exec>
189
-
190
- <exec executable="git" dir="${c-build.dir}/php/ext">
189
+
190
+ <exec executable="git" dir="${c-build.dir}/php/ext">
191
191
<arg line="clone https://github.com/krakjoe/uopz.git"/>
192
192
</exec>
193
193
-->
230
230
<!-- configure, compile and install PHP binary -->
231
231
<exec dir =" ${ c-build.dir } /php" executable =" sh" >
232
232
<!-- <env key="CC" value="${php.cc}"/> -->
233
- <arg line =" configure ${ php.configure } " />
233
+ <arg line =" configure ${ php.configure } --with-libdir= ${ php.configure.libdir } " />
234
234
</exec >
235
235
</target >
236
236
237
237
<!-- ==================================================================== -->
238
238
<!-- Makes the PHP source for the PHP build runtime -->
239
239
<!-- ==================================================================== -->
240
240
<target name =" make" description =" Compiles the php runtime environment." >
241
- <exec dir =" ${ c-build.dir } /php" executable =" make" />
241
+ <exec dir =" ${ c-build.dir } /php" executable =" make" >
242
+ <arg line =" -j6" />
243
+ </exec >
244
+ </target >
245
+
246
+ <!-- ==================================================================== -->
247
+ <!-- Installs the builded php for the PHP build runtime -->
248
+ <!-- ==================================================================== -->
249
+ <target name =" make-install" description =" Installes the php build internally" >
250
+ <exec dir =" ${ c-build.dir } /php" executable =" make" >
251
+ <arg line =" install" />
252
+ </exec >
242
253
</target >
243
254
244
255
<!-- ==================================================================== -->
245
256
<!-- Inits the build source for PHP -->
246
257
<!-- ==================================================================== -->
247
258
<target name =" init-build" description =" Init the php build environment." >
248
- <antcall target =" prepare-source" />
259
+ <antcall target =" prepare-source" />
249
260
<antcall target =" deploy" />
250
261
<antcall target =" configure" />
251
262
<antcall target =" make" />
263
+ <chmod perm =" +x" >
264
+ <fileset dir =" ${ c-build.dir } /php-${ php.version } /scripts" >
265
+ <include name =" **/*" />
266
+ </fileset >
267
+ </chmod >
252
268
</target >
253
269
254
270
<!-- ==================================================================== -->
259
275
<arg line =" package package2.xml" />
260
276
</exec >
261
277
</target >
262
-
263
- <!-- ==================================================================== -->
278
+
279
+ <!-- ==================================================================== -->
264
280
<!-- Runs php tests -->
265
281
<!-- ==================================================================== -->
266
- <target name =" run-tests" description =" Runs the php tests" >
267
- <exec dir =" ${ c-build.dir } /php" executable =" php" >
268
- <env key =" TEST_PHP_EXECUTABLE" value =" ${ c-build.dir } /php/sapi/cli/php" />
269
- <arg line =" ./run-tests.php ${ c-php-tests.dir } " />
270
- </exec >
271
- </target >
272
-
273
- <!-- ==================================================================== -->
282
+ <target name =" run-tests" description =" Runs the php tests" >
283
+ <exec dir =" ${ c-build.dir } /php" executable =" php" >
284
+ <env key =" TEST_PHP_EXECUTABLE" value =" ${ c-build.dir } /php/sapi/cli/php" />
285
+ <arg line =" ./run-tests.php ${ c-php-tests.dir } " />
286
+ </exec >
287
+ </target >
288
+
289
+ <!-- ==================================================================== -->
274
290
<!-- Runs php tests in verbose mode to show all testing relevant info -->
275
291
<!-- ==================================================================== -->
276
- <target name =" run-tests-verbose" description =" Runs the php tests" >
277
- <exec dir =" ${ c-build.dir } /php" executable =" php" >
278
- <env key =" TEST_PHP_EXECUTABLE" value =" ${ c-build.dir } /php/sapi/cli/php" />
279
- <arg line =" ./run-tests.php --show-all ${ c-php-tests.dir } " />
280
- </exec >
281
- </target >
292
+ <target name =" run-tests-verbose" description =" Runs the php tests" >
293
+ <exec dir =" ${ c-build.dir } /php" executable =" php" >
294
+ <env key =" TEST_PHP_EXECUTABLE" value =" ${ c-build.dir } /php/sapi/cli/php" />
295
+ <arg line =" ./run-tests.php --show-all ${ c-php-tests.dir } " />
296
+ </exec >
297
+ </target >
282
298
283
299
</project >
0 commit comments