44 <property environment =" env" />
55
66 <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" />
88 <property name =" c-build.dir" value =" ${ basedir } /build" />
99 <property name =" c-target.dir" value =" ${ basedir } /target" />
1010 <property name =" c-pecl.dir" value =" ${ basedir } /pecl" />
1111
1212 <property file =" ${ user.home } /build.properties" />
1313 <property file =" ${ basedir } /build.properties" />
1414 <property file =" ${ basedir } /build.default.properties" />
15- <property file =" ${ basedir } /build.${ os.family } .properties" />
15+ <property file =" ${ basedir } /build.${ os.name } .properties" />
1616
1717 <!-- ==================================================================== -->
1818 <!-- Cleans the directories with the generated source files -->
6161 </filterchain >
6262 </copy >
6363 </target >
64-
64+
6565 <!-- ==================================================================== -->
6666 <!-- Copies the sources to the deploy directory -->
6767 <!-- ==================================================================== -->
156156 <target name =" get-xdebug-src" depends =" check-xdebug-src-present" unless =" ${ xdebug-src.present } " description =" Get PECL xdebug source package by given version number" >
157157 <get src =" http://pecl.php.net/get/xdebug-${ xdebug.version } .tgz" dest =" /tmp/xdebug-${ xdebug.version } .tgz" />
158158 </target >
159-
159+
160160 <!-- ==================================================================== -->
161161 <!-- Prepares the PHP sources for the runtime -->
162162 <!-- ==================================================================== -->
163163 <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 -->
167167 <antcall target =" get-php-src" />
168168 <untar src =" /tmp/php-${ php.version } .tar.gz" dest =" ${ c-build.dir } " compression =" gzip" />
169169 <chmod perm =" 755" >
170170 <fileset dir =" ${ c-build.dir } /php-${ php.version } /build" >
171171 <include name =" **/*" />
172172 </fileset >
173173 </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 } " />
178178
179179 <antcall target =" get-pthreads-src" />
180180 <untar src =" /tmp/pthreads-${ pthreads.version } .tgz" dest =" /tmp" compression =" gzip" />
181181 <move todir =" ${ c-build.dir } /php/ext/pthreads" >
182182 <fileset dir =" /tmp/pthreads-${ pthreads.version } " />
183183 </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
186186 <exec executable="git" dir="${c-build.dir}/php/ext">
187187 <arg line="clone https://github.com/krakjoe/pthreads.git"/>
188188 </exec>
189-
190- <exec executable="git" dir="${c-build.dir}/php/ext">
189+
190+ <exec executable="git" dir="${c-build.dir}/php/ext">
191191 <arg line="clone https://github.com/krakjoe/uopz.git"/>
192192 </exec>
193193 -->
230230 <!-- configure, compile and install PHP binary -->
231231 <exec dir =" ${ c-build.dir } /php" executable =" sh" >
232232 <!-- <env key="CC" value="${php.cc}"/> -->
233- <arg line =" configure ${ php.configure } " />
233+ <arg line =" configure ${ php.configure } --with-libdir= ${ php.configure.libdir } " />
234234 </exec >
235235 </target >
236236
237237 <!-- ==================================================================== -->
238238 <!-- Makes the PHP source for the PHP build runtime -->
239239 <!-- ==================================================================== -->
240240 <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 >
242253 </target >
243254
244255 <!-- ==================================================================== -->
245256 <!-- Inits the build source for PHP -->
246257 <!-- ==================================================================== -->
247258 <target name =" init-build" description =" Init the php build environment." >
248- <antcall target =" prepare-source" />
259+ <antcall target =" prepare-source" />
249260 <antcall target =" deploy" />
250261 <antcall target =" configure" />
251262 <antcall target =" make" />
263+ <chmod perm =" +x" >
264+ <fileset dir =" ${ c-build.dir } /php-${ php.version } /scripts" >
265+ <include name =" **/*" />
266+ </fileset >
267+ </chmod >
252268 </target >
253269
254270 <!-- ==================================================================== -->
259275 <arg line =" package package2.xml" />
260276 </exec >
261277 </target >
262-
263- <!-- ==================================================================== -->
278+
279+ <!-- ==================================================================== -->
264280 <!-- Runs php tests -->
265281 <!-- ==================================================================== -->
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+ <!-- ==================================================================== -->
274290 <!-- Runs php tests in verbose mode to show all testing relevant info -->
275291 <!-- ==================================================================== -->
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 >
282298
283299</project >
0 commit comments