tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2 build.xml
Date Wed, 22 May 2002 21:26:22 GMT
costin      02/05/22 14:26:22

  Modified:    jk/native2 build.xml
  Log:
  Reduce the ammount of user interaction. Based on Anthony's sugestion, we
  set 'linux' ( and win32, netware, etc ) based on os.name and the
  presence of the NDK ( since netware is cross-compiled ).
  
  We also have reasonable defaults ( i.e. the default install location
  on windows ) and a platfrom-specific init section can be added.
  
  ( you still need to set the PATH before runnint ant to include
  mssdk.home/Common/MSDev98/bin - cl.exe is looking for a DLL and I can't
  find any other way to deal with that right now )
  
  Revision  Changes    Path
  1.27      +89 -79    jakarta-tomcat-connectors/jk/native2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- build.xml	16 May 2002 22:39:34 -0000	1.26
  +++ build.xml	22 May 2002 21:26:22 -0000	1.27
  @@ -26,8 +26,22 @@
     <!-- Uncomment if you want to use APR in apache1.3 
     <property name="APACHE13_APR" value="true" />
       -->
  + 
  +  <!-- Override it in build.properties if using windows and a 
  +       different location. I think that's the defaul location for msdev -->
  +  <property name="mssdk.home" 
  +            location="c:/Program Files/Microsoft Visual Studio/VC98"/>
  +
  +  <property name="mw.home" location="d:/tools/mw/6.0" />
  +  <property name="novellndk.home" location="d:/tools/novell/ndk/nwsdk" />
  +
   
     <!-- ========== Build options ========== -->
  +
  +  <!-- Use the jni worker and libs whenever possible -->    
  +  <property name="use.jni" value="true" />
  +  <!-- Use apr whenever possible -->    
  +  <property name="use.apr" value="true" />
     
     <property name="so.debug" value="true" />
     <property name="so.optimize" value="false" />
  @@ -55,10 +69,11 @@
     <target name="all" depends="jkant,init,apache20,apache13,jni">
     </target>
   
  -  <target name="init" >
  -    <echo message="build.properties.${os.arch}.${os.name}" />
  +  <target name="guess.env" >
  +    <echo message="build.properties ${os.arch}.${os.name}" />
       <taskdef resource="META-INF/ant.tasks" 
   	     classpathref="jkant" />
  +
       <available property="HAS_APR" file="${apr.include}/apr.h" />
       <available property="apache13.detect" 
                  file="${apache13.home}/bin/htpasswd" />
  @@ -68,11 +83,49 @@
                  file="${iis.home}" />
       <available property="iplanet.detect" 
                  file="${iplanet.home}" />
  -    <mkdir dir="${build.dir}" />
  +
  +    <condition property="linux">
  +       <equals arg1="${os.name}" arg2="Linux"/>
  +    </condition>
  +    <condition property="win32">
  +      <os family="windows"/>
  +    </condition>
  +    <condition property="hpux">
  +      <equals arg1="${os.name}" arg2="???"/>
  +    </condition>
  +    <condition property="solaris">
  +      <equals arg1="${os.name}" arg2="???"/>
  +    </condition>
  +
  +    <!-- I believe they are using cross-compilation, so checking the os.name
  +         doesn't help. We'll check if the NDK is installed instead -->
  +    <condition property="netware">
  +      <available file="novellndk.home" />
  +    </condition>
  +
       <echo message="Apache2 ${apache2.home} ${apache2.detect}" />
       <echo message="Apache13 ${apache13.home} ${apache13.detect}" />
       <echo message="IIS ${iis.home} ${iis.detect}" />
       <echo message="Iplanet ${iplanet.home} ${iplanet.detect}" />
  +    <echo message="" />
  +    <echo message="Linux:${linux} Win32:${win32} Netware:${netware}" />
  +  </target>
  +
  +  <target name="init.win32" if="win32" >
  +    <property name="build.compiler.base" location="${mssdk.home}" />
  +    <property name="build.compiler.cc" location="${mssdk.home}/bin/cl" />
  +    <property name="build.compiler.ld" location="${mssdk.home}/bin/link" />
  +  </target>
  +
  +  <target name="init.netware" if="netware" >
  +    <property name="build.compiler.base" location="${mw.home}" />
  +    <property name="build.compiler.cc" location="${build.compiler.base}/bin/mwccnlm"
/>
  +    <property name="build.compiler.ld" location="${build.compiler.base}/bin/mwldnlm"
/>
  +    <property name="novelllibc.dir" location="${novellndk.home}/libc" />
  +  </target>
  +
  +  <target name="init" depends="guess.env,init.win32,init.netware" >
  +    <mkdir dir="${build.dir}" />
     </target>
   
     <target name="jkant" >
  @@ -103,12 +156,10 @@
         <def name="_MBCS" if="win32" />
         <def name="_USRDLL" if="win32" />
         <def name="MOD_JK2_EXPORTS" if="win32" />
  -       <src dir=".">
  +      <src dir=".">
   	<include name="server/apache2/*.c" />
   	<include name="common/*.c" />
  -	<include name="common/apr/*.c" />
  -	<include name="jni/*.c" unless="win32"/>
  -	<!-- <exclude name="common/jk_channel_apr_socket.c" if="win32"/> -->
  +	<include name="jni/*.c" />
         </src>
         <includes>
   	<include name="${native.dir}/common" />
  @@ -120,6 +171,7 @@
           <include name="${java.home}/../include/linux" if="linux" />
           <include name="${java.home}/../include/hp-ux" if="hpux" />        
           <include name="${java.home}/../include/win32" if="win32" />        
  +        <include name="&quot;${mssdk.home}/include&quot;" if="win32"/>
         </includes>
         <depends>
   	<fileset dir="${native.dir}/common" includes="*.h" />
  @@ -141,45 +193,6 @@
       </so>
     </target>
     
  -  <target name="nt_service" depends="init" if="win">
  -    <mkdir dir="${build.dir}/nt_service" />
  -    <so execFile="nt_service" 
  -	buildDir="${build.dir}/apache2"
  -	optimize="${so.optimize}"
  -	debug="${so.debug}"
  -	taskDebug="0"
  -	profile="${so.profile}"	>
  -      <def name="_REENTRANT" />
  -      <def name="CHUNK_SIZE" value="4096" 
  -	   info="Read/Write buffer size" />
  -      <def name="USE_APACHE_MD5" 
  -	   info="Use the MD5 implementation that is part of apache2" />
  -      <def name="HAS_APR" 
  -	   info="Allow APR specific extensions" />
  -      <def name="HAVE_JNI" 
  -	   info="Jni worker" />
  -      <def name="HPUX11" if="hpux" />
  -      <src dir=".">
  -	<include name="server/apache2/*.c" />
  -	<include name="common/*.c" />
  -	<include name="common/apr/*.c" />
  -      </src>
  -      <includes>
  -	<include name="${native.dir}/common" />
  -	<include name="${apache2.include}" />
  -	<include name="${apr.include}" />
  -	<include name="${native.dir}/include" />
  -	<include name="${java.home}/../include" />
  -        <include name="${java.home}/../include/linux" if="linux" />
  -        <include name="${java.home}/../include/hp-ux" if="hpux" />        
  -      </includes>
  -      <depends>
  -	<fileset dir="${native.dir}/common" includes="*.h" />
  -	<fileset dir="${native.dir}/include" includes="*.h" />
  -      </depends>
  -    </so>
  -  </target>
  -  
     <target name="jni" depends="init">
       <mkdir dir="${build.dir}/jni" />
       <!-- can be overriden -->
  @@ -205,8 +218,8 @@
   	<include name="${apr.include}" />
           
           <!-- Platform specific includes -->
  -	<include name="${novellndk.dir}/include/nlm" if="netware" />
  -	<include name="${novellndk.dir}/include" if="netware" />
  +	<include name="${novellndk.home}/include/nlm" if="netware" />
  +	<include name="${novellndk.home}/include" if="netware" />
           <include name="${java.home}/../include/netware" if="netware" />
           
           <include name="${java.home}/../include/win32" if="win32" />
  @@ -234,11 +247,11 @@
   	   info="JNI is no based on APR" />
         <def name="HAVE_JNI" />
              
  -      <import fileName="${novellndk.dir}/imports/clib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/lib0.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/nlmlib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/threads.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/socklib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/clib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/lib0.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/nlmlib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/threads.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/socklib.imp" if="netware" />
         <export fileName="${native.dir}/jni/jk_jnicb.exp" if="netware" />
         <linkOpt value="-desc &quot;JNI Natives for Tomcat&quot;" if="netware"
/>
         <linkOpt value="-screenname &quot;System Console&quot;" if="netware" />
  @@ -270,8 +283,7 @@
         <src dir=".">
   	<include name="server/apache13/*.c" />
   	<include name="common/*.c" />
  -        <exclude name="jk_nwmain.c" 
  -		 unless="netware" />
  +        <exclude name="jk_nwmain.c" unless="netware" />
           <exclude name="common/jk_pool_apr.c" unless="APACHE13_APR" />
           <exclude name="common/jk_channel_apr_socket.c" unless="APACHE13_APR" />
         </src>
  @@ -287,9 +299,9 @@
   
           <!-- Platform specific includes -->
   	<include name="${apache13.home}/os/netware" if="netware" />
  -	<include name="${novellndk.dir}/include/nlm" if="netware" />
  -	<include name="${novellndk.dir}/include" if="netware" />
  -	<include name="${novellndk.dir}/include/winsock" if="netware" />
  +	<include name="${novellndk.home}/include/nlm" if="netware" />
  +	<include name="${novellndk.home}/include" if="netware" />
  +	<include name="${novellndk.home}/include/winsock" if="netware" />
           <include name="${java.home}/../include/netware" if="netware" />
                    
   	<include name="${apache13.home}/os/win32" if="win32" />
  @@ -322,12 +334,12 @@
         <def name="MOD_JK_EXPORTS" if="win32" />
         
         <nlmmodule value="apache" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/clib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/lib0.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/nlmlib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/threads.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/socklib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/ws2nlm.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/clib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/lib0.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/nlmlib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/threads.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/socklib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/ws2nlm.imp" if="netware" />
         <import fileName="${apache13.home}/os/netware/ApacheCore.imp" if="netware" />
         <export symbol="jk_module" if="netware" />
         <linkOpt value="-desc &quot;Apache 1.3 plugin for Tomcat&quot;" if="netware"
/>
  @@ -362,11 +374,9 @@
           <include name="common/*.c" />
           <exclude name="common/jk_channel_apr_socket.c"/>
           <exclude name="common/jk_pool_apr.c"/>
  -        <exclude name="jk_nwmain.c" 
  -                 unless="netware" />
  +        <exclude name="jk_nwmain.c" unless="netware" />
   	<include name="jni/*.c" />
  -        <exclude name="jk_apr.c" 
  -                 unless="netware" />
  +        <exclude name="jk_apr.c" unless="netware" />
         </src>
         <includes>
           <include name="${java.home}/../include" />
  @@ -376,7 +386,7 @@
           <include name="${native.dir}/server/isapi" />
           <include name="${build.compiler.base}/include" />
           <!--include name="&quot;${build.compiler.base}/include&quot;" /-->
  -        <include name="&quot;$(mssdk.include)&quot;"/>
  +        <include name="&quot;${mssdk.home}/include&quot;"/>
         </includes>
         <depends>
           <fileset dir="${native.dir}/common" includes="*.h" />
  @@ -399,7 +409,8 @@
         <export symbol="TerminateFilter"/>
         <export symbol="TerminateExtension"/>
         <!--linkOpt value="/libpath:&quot;${build.compiler.base}/lib&quot;" if="win32"
/-->
  -      <linkOpt value="/libpath:&quot;$(mssdk.lib)&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/lib&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/../Common/MSDev98/bin&quot;"
if="win32" />
       </so>
     </target>
   
  @@ -416,8 +427,7 @@
         <src dir=".">
   	<include name="netscape/jk_nsapi_plugin.c" />
   	<include name="common/*.c" />
  -        <exclude name="jk_nwmain.c" 
  -		 unless="netware" />
  +        <exclude name="jk_nwmain.c" unless="netware" />
           <include name="common/apr/*.c" unless="HAVE_APR" />
   	<include name="jni/*.c" />
         </src>
  @@ -430,8 +440,8 @@
   
           <!-- Platform specific includes -->
           
  -	<include name="${novellndk.dir}/include/nlm" if="netware" />
  -	<include name="${novellndk.dir}/include" if="netware" />
  +	<include name="${novellndk.home}/include/nlm" if="netware" />
  +	<include name="${novellndk.home}/include" if="netware" />
           <include name="${java.home}/../include/netware" if="netware" />
                    
   	<include name="${apache13.home}/os/win32" if="win32" />
  @@ -468,11 +478,11 @@
   	   info="Unix platform - needed for nsapi.h" />
         
         <nlmmodule value="nshttpd" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/clib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/lib0.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/nlmlib.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/threads.imp" if="netware" />
  -      <import fileName="${novellndk.dir}/imports/socklib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/clib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/lib0.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/nlmlib.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/threads.imp" if="netware" />
  +      <import fileName="${novellndk.home}/imports/socklib.imp" if="netware" />
         <import fileName="${netscape.home}/imports/nsapi.imp" if="netware" />
         <export symbol="jk_init" if="netware" />
         <export symbol="jk_service" if="netware" />
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message