Author: brett
Date: Tue Jan 18 01:11:01 2005
New Revision: 125473

URL: http://svn.apache.org/viewcvs?view=rev&rev=125473
Log:
allow different arguments to cl
Modified:
   maven/maven-1/plugins/trunk/native/   (props changed)
   maven/maven-1/plugins/trunk/native/plugin.jelly
   maven/maven-1/plugins/trunk/native/xdocs/changes.xml
   maven/maven-1/plugins/trunk/native/xdocs/faq.fml

Modified: maven/maven-1/plugins/trunk/native/plugin.jelly
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/native/plugin.jelly?view=diff&rev=125473&p1=maven/maven-1/plugins/trunk/native/plugin.jelly&r1=125472&p2=maven/maven-1/plugins/trunk/native/plugin.jelly&r2=125473
==============================================================================
--- maven/maven-1/plugins/trunk/native/plugin.jelly     (original)
+++ maven/maven-1/plugins/trunk/native/plugin.jelly     Tue Jan 18 01:11:01 2005
@@ -47,7 +47,17 @@
        <ant:available property="jniFilesPresent" 
file="${maven.build.dir}/native/jni"/>
         
        <!-- for some reason '.' aren't allow as parameter for outfile-->
-       <cc outfile="${maven.build.dir}/native/_" link="${maven.native.link}" 
debug="${maven.native.debug}">
+
+       <!-- 17 Dec 2004 - baleineca
+                       Checking for runtime property and adding it.  Default 
to "dynamic" if not present.
+                       Seems like this is the only way at time of writing to 
get ccTask to pass something else than the default /MD arg to cl.         
+       -->
+       <j:set var="runtime" value="${maven.native.runtime}"/>
+       <j:if test="${runtime} == ''">
+                       <j:set var="runtime" value="dynamic"/>
+       </j:if>
+       
+       <cc outfile="${maven.build.dir}/native/_" link="${maven.native.link}" 
debug="${maven.native.debug}" runtime="${runtime}" rtti="${rtti}">
          <compiler name="${maven.native.compiler.name}">
            <compilerparam name="target" 
value="${maven.native.compiler.target}"/>
 
@@ -152,6 +162,14 @@
             <ant:copy file="${maven.build.dir}/native/_.dll" 
                 
tofile="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" 
overwrite="true"/>
        </j:if> 
+       
+       <!-- dylib -->
+       <ant:available property="outputPresentDylib" 
file="${maven.build.dir}/native/lib_.dylib"/>
+       <j:if test="${outputPresentDylib == 'true'}">
+          <ant:copy file="${maven.build.dir}/native/lib_.dylib" 
+            
tofile="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib"
 overwrite="true"/>
+       </j:if>
+       
     </goal>
 
     <!-- ================================================================== -->
@@ -179,6 +197,14 @@
         <ant:property name="libdir__" 
value="${maven.repo.local}/${pom.artifactDirectory}/dlls"/>
         <ant:mkdir dir="${libdir__}"/>
         <ant:copy 
file="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" 
tofile="${libdir__}/${pom.artifactId}-${pom.currentVersion}.dll" 
overwrite="true"/>      
+      </j:if>
+      
+      <!-- jnilib -->
+      <ant:available property="libPresentJnilib" 
file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib"/>
       
+      <j:if test="${libPresentJnilib == 'true'}">
+             <ant:property name="libdir__" 
value="${maven.repo.local}/${pom.artifactDirectory}/jnilibs"/>
+             <ant:mkdir dir="${libdir__}"/>
+          <ant:copy 
file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib"
 tofile="${libdir__}/lib${pom.artifactId}-${pom.currentVersion}.jnilib" 
overwrite="true"/>
       </j:if>
     </goal>
     

Modified: maven/maven-1/plugins/trunk/native/xdocs/changes.xml
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/native/xdocs/changes.xml?view=diff&rev=125473&p1=maven/maven-1/plugins/trunk/native/xdocs/changes.xml&r1=125472&p2=maven/maven-1/plugins/trunk/native/xdocs/changes.xml&r2=125473
==============================================================================
--- maven/maven-1/plugins/trunk/native/xdocs/changes.xml        (original)
+++ maven/maven-1/plugins/trunk/native/xdocs/changes.xml        Tue Jan 18 
01:11:01 2005
@@ -25,6 +25,7 @@
   </properties>
   <body>
     <release version="1.2-SNAPSHOT" date="in CVS">
+      <action dev="brett" type="add" due-to="baleineca">Checking for runtime 
property and adding it.  Default to "dynamic" if not present.</action>
       <action dev="brett" type="fix" issue="MPNATIVE-10" due-to="Joachim 
Bader">Add DLL support to the plugin</action>
       <action dev="brett" type="fix" issue="MPNATIVE-7" due-to="Joachim 
Bader">Changed repository location of libraries from <code>so</code> to 
<code>sos</code> so Maven can handle them as dependencies</action>
       <action dev="brett" type="add" issue="MPNATIVE-7" due-to="Joachim 
Bader">Add support for native dependencies (libset/syslibset)</action>

Modified: maven/maven-1/plugins/trunk/native/xdocs/faq.fml
Url: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/native/xdocs/faq.fml?view=diff&rev=125473&p1=maven/maven-1/plugins/trunk/native/xdocs/faq.fml&r1=125472&p2=maven/maven-1/plugins/trunk/native/xdocs/faq.fml&r2=125473
==============================================================================
--- maven/maven-1/plugins/trunk/native/xdocs/faq.fml    (original)
+++ maven/maven-1/plugins/trunk/native/xdocs/faq.fml    Tue Jan 18 01:11:01 2005
@@ -7,12 +7,41 @@
     <faq id="cygwin">
       <question>How to run the gcc under cygwin?</question>
       <answer>
-        Set the follwing properties in your <code>project.properties</code>:
+        <p>
+          Set the following properties in your <code>project.properties</code>:
+        </p>
         <source>
-            maven.native.include.os=win32
-            maven.native.compiler.arg.start=-mno-cygwin
-            maven.native.linker.arg.start=-mno-cygwin -Wl,--add-stdcall-alias  
          
-        </source>
+maven.native.include.os=win32
+maven.native.compiler.arg.start=-mno-cygwin
+maven.native.linker.arg.start=-mno-cygwin -Wl,--add-stdcall-alias</source>
+      </answer>
+    </faq>
+    <faq id="msvc">
+      <question>How to run cl on Windows?</question>
+      <answer>
+        <p>
+          Set the following properties in your <code>project.properties</code>:
+        </p>
+        <source>
+maven.native.include.os=win32
+maven.native.compiler.name=msvc</source>
+        <p>
+          Optionally, you can set the following property if you don't want the 
+          default argument /MD (or /MDd if in debug mode) to be passed to cl.
+          At time of writing, this always gets set by CCTask so even if you 
+          pass a different argument with maven.native.compiler.arg.start 
+          property, it won't be unset.  You will simply end up with 2 
+          arguments...
+        </p>
+        <source>
+maven.native.runtime=static</source>
+        <p>
+          Other arguments for cl can be passed in by setting the following 
+          property (with values you *really* want, of course, this is just an 
+          example).  Multiple values are separated by a space.
+        </p>
+        <source>
+maven.native.compiler.arg.start=/GR /GX</source>
       </answer>
     </faq>
   </part>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to