harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r593508 - in /harmony/enhanced/drlvm/trunk/build/make/components/extra: apr.xml aprutil.xml
Date Fri, 09 Nov 2007 12:16:14 GMT
Author: varlax
Date: Fri Nov  9 04:16:12 2007
New Revision: 593508

URL: http://svn.apache.org/viewvc?rev=593508&view=rev
Log:
Getting rid of xsl preprocessing

Modified:
    harmony/enhanced/drlvm/trunk/build/make/components/extra/apr.xml
    harmony/enhanced/drlvm/trunk/build/make/components/extra/aprutil.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/components/extra/apr.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/extra/apr.xml?rev=593508&r1=593507&r2=593508&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/extra/apr.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/extra/apr.xml Fri Nov  9 04:16:12 2007
@@ -28,17 +28,14 @@
   -->
 
 <project name="extra.apr">
-    <target name="copy.apr.includes">
+    <target name="-copy-apr-includes" unless="is.apr.configured">
         <mkdir dir="${build.dir}/include/apr-1" />
-
         <copy todir="${build.dir}/include/apr-1">
             <fileset dir="${includes.apr}" includes="*.h" />
         </copy>
-
-        <property name="includes" location="${build.dir}/include/apr-1" />
     </target>
 
-    <target name="prepare_src">
+    <target name="-get-src" unless="is.apr.configured">
         <mkdir dir="${build.dir}/src" />
         <copy todir="${build.dir}/src" failonerror="true">
             <fileset dir="${build.APR.home}" includes="**/*" />
@@ -48,90 +45,47 @@
                 <include name="**/*" />
             </fileset>
         </chmod>
-        <property name="src" location="${build.dir}/src" />
-        <property name="includes.apr" location="${src}/include" />
     </target>
 
-    <target name="configure-check" depends="prepare_src">
-        <condition property="apr-config-available" value="true">
-            <available file="${includes.apr}/apr.h" />
+    <target name="-setup">
+        <property name="src" location="${build.dir}/src" />
+        <property name="includes.apr" location="${src}/include" />
+        <condition property="is.apr.configured" value="true">
+            <available file="${build.dir}/include/apr-1/apr.h" />
         </condition>
     </target>
 
-    <target name="apr-configure" unless="apr-config-available">
-        <select osfamily="unix">
-        	
-<!--            <exec executable="sh" dir="${src}">
-                <arg value="./buildconf" />
-            </exec>
--->
+    <target name="apr-configure" depends="-setup,-get-src" unless="apr-config-available"
if="is.unix">
             <exec executable="sh" dir="${src}">
                 <arg value="./configure" />
             </exec>
-
             <replaceregexp file="${includes.apr}/apr.h" match="#define APR_HAS_OS_UUID
          1" replace="#define APR_HAS_OS_UUID           0" />
-
             <replaceregexp file="${includes.apr}/apr.h" match="APR_HAS_POSIXSEM_SERIALIZE
       0" replace="APR_HAS_POSIXSEM_SERIALIZE        1" />
-
             <replaceregexp file="${includes.apr}/apr.h" match="#define APR_HAS_PROC_PTHREAD_SERIALIZE
   0" replace="#define APR_HAS_PROC_PTHREAD_SERIALIZE    1" />
-        </select>
-
-        <select os="win">
-            <copy file="${includes.apr}/apr.hw" tofile="${includes.apr}/apr.h" failonerror="true"
/>
-        </select>
     </target>
 
-    <target name="init" depends="configure-check, apr-configure, copy.apr.includes, common_extra">
+    <target name="init" depends="apr-configure,-init-unix,-init-win,-copy-apr-includes">
+        <property name="includes" location="${build.dir}/include/apr-1" />
         <property name="libname" value="apr-1" />
         <property name="outtype" value="static" />
+    </target>
 
-        <select osfamily="unix">
-
+    <target name="-init-unix" depends="common_extra" if="is.unix">
         	<!-- simply invoke make to let it build as the APR people suggest  -->
             <!-- we'll need to tune this wrt flags and such                    -->
-        	<select arch="em64t">
-                <replaceregexp file="${src}/build/apr_rules.mk" match="CFLAGS=" replace="CFLAGS=-fpic
" />
-            </select>
-            
-        	<exec executable="make" dir="${src}"/>
-        	        		
-        	<!-- the rest of the build expect the lib to be in _bin  -->
-        	
-        	<copy file="${src}/.libs/lib${libname}.a" todir="${src}/../_bin" />
-
-    	<!--  this is the original build approach - leaving here for now 
-    	
-            <compiler id="c.compiler" extends="common.c.compiler">
-                <includepath path="${src}/include" />
-                <includepath path="${src}/include/arch" />
-                <includepath path="${src}/include/arch/unix" />
-
-                <fileset dir="${src}">
-                    <include name="**/unix/*.c" />
-                    <exclude name="**/unix/apr_app.c" />
-                </fileset>
+        <condition property="extra.flags" value="-fpic" else="">
+            <isset property="is.x86_64"/>
+        </condition>
+        <replaceregexp file="${src}/build/apr_rules.mk" match="CFLAGS=" replace="CFLAGS=${extra.flags}
" />
 
-                <fileset dir="${src}/file_io/unix" includes="copy.c fileacc.c filepath_util.c
fullrw.c mktemp.c tempdir.c" />
-                <fileset dir="${src}/memory/unix" includes="*.c" />
-                <fileset dir="${src}/misc/unix" includes="*.c" />
-                <fileset dir="${src}/mmap/unix" includes="common.c" />
-                <fileset dir="${src}/network_io/unix" includes="inet_ntop.c inet_pton.c
sockaddr.c" />
-                <fileset dir="${src}/poll/unix" includes="select.c" />
-                <fileset dir="${src}/random/unix" includes="*.c" />
-                <fileset dir="${src}/strings" includes="*.c" />
-                <fileset dir="${src}/tables" includes="*.c" />
-                <fileset dir="${src}/support/unix" includes="waitio.c" />
-
-                <defineset define="APR_DECLARE_EXPORT,PLATFORM_POSIX,_LARGEFILE64_SOURCE"
/>
-                <defineset define="_HAVE_CONFIG_H,_REENTRANT,_GNU_SOURCE" />
-
-                <select arch="ipf,em64t">
-                    <compilerarg value="-fPIC" />
-                </select>
-            </compiler>
-            -->
-        </select>
-        <select os="win">
+        <exec executable="make" dir="${src}"/>
+        <!-- the rest of the build expect the lib to be in _bin  -->
+    	<copy file="${src}/.libs/libapr-1.a" todir="${src}/../_bin" />
+    </target>
+    
+    <target name="-init-win" depends="common_extra" if="is.windows">
+        <copy file="${includes.apr}/apr.hw" tofile="${includes.apr}/apr.h"/>
+        
             <compiler id="c.compiler" extends="common.c.compiler">
                 <includepath>
                     <dirset dir="${src}">
@@ -185,6 +139,5 @@
 
                 <defineset define="APR_DECLARE_EXPORT" />
             </compiler>
-        </select>
     </target>
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/components/extra/aprutil.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/extra/aprutil.xml?rev=593508&r1=593507&r2=593508&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/extra/aprutil.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/extra/aprutil.xml Fri Nov  9 04:16:12
2007
@@ -28,9 +28,8 @@
 
 <project name="extra.aprutil">
 
-    <target name="prepare_src">
-        <mkdir dir="${build.dir}/src" />
-        <property name="src" location="${build.dir}/src" />
+    <target name="-get-src" unless="is.aprutil.configured">
+        <mkdir dir="${src}" />
         <copy todir="${src}" failonerror="true">
             <fileset dir="${build.APRUTIL.home}/" includes="**/*" />
         </copy>
@@ -46,11 +45,12 @@
                 <include name="**/*" />
             </fileset>
         </chmod>
-        <property name="includes" location="${src}/include" />
     </target>
 
-    <target name="configure-check" depends="prepare_src">
-        <condition property="aprutil-config-available" value="true">
+    <target name="-setup">
+        <property name="src" location="${build.dir}/src" />
+        <property name="includes" location="${src}/include" />
+        <condition property="is.aprutil.configured" value="true">
             <and>
                 <available file="${includes}/apu.h" />
                 <available file="${includes}/apu_want.h" />
@@ -62,40 +62,35 @@
         </condition>
     </target>
 
-    <target name="configure" unless="aprutil-config-available">
-        <select osfamily="unix">
-            <exec executable="sh" dir="${src}">
-                <arg value="./buildconf" />
-                <arg value="--with-apr=${extra.apr.src}" />
-            </exec>
-            <exec executable="sh" dir="${src}">
-                <arg value="./configure" />
-                <arg value="--with-apr=${extra.apr.src}" />
-                <arg value="CC=${build.cxx}" />
-            </exec>
-            <exec executable="sh" dir="${src}/xml/expat">
-                <arg value="./configure" />
-                <arg value="CC=${build.cxx}" />
-            </exec>
-        </select>
-        <select os="win">
-            <copy tofile="${includes}/apu.h" file="${includes}/apu.hw" />
-            <!--
-                        <replaceregexp file="${includes}/apu.h" match="#define *APU_HAVE_APR_ICONV.*"
replace="#define APU_HAVE_APR_ICONV 0" />
-                        -->
-            <copy tofile="${includes}/apu_want.h" file="${includes}/apu_want.hw" />
-            <copy tofile="${includes}/apr_ldap.h" file="${includes}/apr_ldap.hw" />
-            <!--
-                        <replaceregexp file="${includes}/apr_ldap.h" match="#define APR_HAS_LDAP.*"
replace="#define APR_HAS_LDAP 0" />
-                        -->
-            <copy tofile="${includes}/private/apu_config.h" file="${includes}/private/apu_config.hw"
/>
-            <copy tofile="${includes}/private/apu_select_dbm.h" file="${includes}/private/apu_select_dbm.hw"
/>
-            <copy tofile="${src}/xml/expat/lib/expat.h" file="${src}/xml/expat/lib/expat.h.in"
/>
-            <copy tofile="${src}/xml/expat/lib/config.h" file="${src}/xml/expat/lib/winconfig.h"
/>
-        </select>
+    <target name="-configure-unix" unless="is.aprutil.configured" if="is.unix">
+        <exec executable="sh" dir="${src}">
+            <arg value="./buildconf" />
+            <arg value="--with-apr=${extra.apr.src}" />
+        </exec>
+        <exec executable="sh" dir="${src}">
+            <arg value="./configure" />
+            <arg value="--with-apr=${extra.apr.src}" />
+            <arg value="CC=${build.cxx}" />
+        </exec>
+        <exec executable="sh" dir="${src}/xml/expat">
+            <arg value="./configure" />
+            <arg value="CC=${build.cxx}" />
+        </exec>
     </target>
-
-    <target name="init" depends="configure-check, configure, common_extra">
+    
+    <target name="-configure-win" unless="is.aprutil.configured" if="is.windows">
+        <copy tofile="${includes}/apu.h" file="${includes}/apu.hw" />
+        <copy tofile="${includes}/apu_want.h" file="${includes}/apu_want.hw" />
+        <copy tofile="${includes}/apr_ldap.h" file="${includes}/apr_ldap.hw" />
+        <copy tofile="${includes}/private/apu_config.h" file="${includes}/private/apu_config.hw"
/>
+        <copy tofile="${includes}/private/apu_select_dbm.h" file="${includes}/private/apu_select_dbm.hw"
/>
+        <copy tofile="${src}/xml/expat/lib/expat.h" file="${src}/xml/expat/lib/expat.h.in"
/>
+        <copy tofile="${src}/xml/expat/lib/config.h" file="${src}/xml/expat/lib/winconfig.h"
/>
+    </target>
+            
+    <target name="configure" depends="-setup,-get-src,-configure-win,-configure-unix"/>
+    
+    <target name="init" depends="configure,-init-win,-init-unix">
         <property name="build.depends" value="extra.apr, extra.apriconv" />
         <property name="libname" value="aprutil-1" />
         <property name="outtype" value="static" />
@@ -106,9 +101,9 @@
             <replacefilter token="XML_MICRO_VERSION" value="1" />
             <replacefilter token="VERSION" value='"expat_1.95.1"' />
         </replace>
-
-    	<select osfamily="unix">
-
+    </target>
+    
+    <target name="-init-unix" depends="common_extra" if="is.unix">
             <compiler id="c.compiler" extends="common.c.compiler">
                 <fileset dir="${src}" includes="**/*.c" excludes="test/*.c ldap/*.c xml/expat/lib/*"
/>
                 <fileset dir="${src}/xml/expat/lib" includes="xmlparse.c xmlrole.c xmltok.c"
/>
@@ -122,20 +117,15 @@
                 <includepath path="${src}/xml/expat" />
                 <defineset define="APU_DECLARE_EXPORT" />
                 <defineset define="APR_DECLARE_EXPORT" />
-                <!--                <select cxx="gcc"> -->
                 <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" />
-                <!--                </select> -->
                 <defineset>
                     <define name="APU_HAVE_APR_ICONV" value="0" />
                 </defineset>
-                <select osfamily="unix" arch="em64t">
-                    <compilerarg value="-fPIC" />
-                </select>
+                <compilerarg value="-fPIC" if="is.x86_64"/>
             </compiler>
+    </target>
 
-        </select>
-        <echo message="apriconv: ${extra.apriconv.includes} " />
-        <select os="win">
+    <target name="-init-win" depends="common_extra" if="is.windows">
             <compiler id="c.compiler" extends="common.c.compiler">
                 <includepath>
                     <pathelement location="${extra.apriconv.includes}" />
@@ -168,6 +158,5 @@
                 <fileset dir="${src}/xml/expat/lib" includes="xmlparse.c xmlrole.c xmltok.c"
/>
                 <defineset define="APR_DECLARE_EXPORT,APU_DECLARE_EXPORT,API_DECLARE_EXPORT,APU_USE_SDBM"
/>
             </compiler>
-        </select>
     </target>
 </project>



Mime
View raw message