This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Mappers in build.xml


Hi 

I've noticed that when one sets the property build.dir the ant script will recompile everything when called even though the sources haven't changed.
The problem is that various 'uptodate' elements in build.xml contains mapper elements that do not take the property build.dir into account.

Here's a patch for that. 

One small catch: It will not work if (e.g.) build.dir=./build. One has to do: build.dir=${basedir}/build , i.e. absolute paths. So the patch also changes the build.dir template in build.properties.

There should be no regressions. Users that have build.dir=./build will recompile everything each time as they do now. Users that don't have build.dir set shouldn't notice any difference.


-- 
Formalia:

I, Christian Surlykke, hereby assign the copyright to the code-changes attached to this mail, to Per Bothner on the condition that he will make them available under the Gnu General Public License, Version 2, ?as published by the Free Software Foundation. Other than that no restrictions on Per Bothners use of the changes is implied.
I declare that I am the sole author of these changes and that I know of no other person having any claims on it.

br. Chr.

Fri May 27 21:57:48 CEST 2005  christian@surlykke.dk
  * Correct build mappers
diff -rN -uN old-work/kawa/build.properties new-work/kawa/build.properties
--- build.properties	2005-05-27 21:58:07.315708163 +0200
+++ build.properties	2005-05-27 07:20:54.000000000 +0200
@@ -10,7 +10,7 @@
 # You may need to override this if your JVM doesn't set the user.dir property.
 # Uncommenting the following leaves the temporaries in the build
 # subirectory of the directory containing build.xml.
-# build.dir=./build
+# build.dir=${basedir}/build
 
 # The version label is reported by Kawa and goes into the jar name.
 # The default is ${version.release}${version.local}.
diff -rN -uN old-work/kawa/build.xml new-work/kawa/build.xml
--- build.xml	2005-05-27 21:58:07.319707617 +0200
+++ build.xml	2005-05-27 21:57:16.000000000 +0200
@@ -452,7 +452,7 @@
 
   <target name="check-lib-scm-classes">
     <uptodate property="lib-scm-classes-uptodate">
-      <mapper type="glob" from="*.scm" to="*.class"/>
+      <mapper type="glob" from="*.scm" to="${build.dir}/kawa/lib/*.class"/>
       <srcfiles refid="lib-scm-1"/> 
       <srcfiles refid="lib-scm-2"/> 
       <srcfiles refid="lib-scm-3"/>
@@ -487,7 +487,7 @@
 
   <target name="check-commonlisp-scm-classes">
     <uptodate property="commonlisp-scm-classes-uptodate">
-      <mapper type="glob" from="*.scm" to="*.class"/>
+      <mapper type="glob" from="*.scm" to="${build.dir}/gnu/commonlisp/lisp/*.class"/>
       <srcfiles refid="commonlisp-scm"/>
     </uptodate>
   </target>
@@ -519,7 +519,7 @@
 
   <target name="check-slib-scm-classes">
     <uptodate property="slib-scm-classes-uptodate">
-      <mapper type="glob" from="*.scm" to="*.class"/>
+      <mapper type="glob" from="*.scm" to="${build.dir}/gnu/kawa/slib/*.class"/>
       <srcfiles refid="slib-scm"/>
     </uptodate>
   </target>
@@ -638,19 +638,27 @@
     <condition property="jemacs-lisp-classes-uptodate"> 
       <and>
         <uptodate>
-          <mapper type="glob" from="*.scm" to="*.class"/>
+          <mapper type="glob" 
+          	  from="*.scm" 
+          	  to="${build.dir}/gnu/jemacs/lang/*.class"/>
           <srcfiles refid="jemacs-lang-scm"/>
         </uptodate>
-        <uptodate>
-          <mapper type="glob" from="*.scm" to="*.class"/>
+      	<uptodate>
+          <mapper type="glob" 
+          	  from="*.scm" 
+          	  to="${build.dir}/gnu/jemacs/buffer/*.class"/>
           <srcfiles refid="jemacs-buffer-scm"/>
         </uptodate>
         <uptodate>
-          <mapper type="glob" from="*.scm" to="*.class"/>
+          <mapper type="glob" 
+          	  from="*.scm" 
+          	  to="${build.dir}/gnu/kawa/slib/*.class"/>
           <srcfiles refid="jemacs-slib-scm"/>
         </uptodate>
         <uptodate>
-          <mapper type="glob" from="*.el" to="*.class"/>
+          <mapper type="glob" 
+          	  from="*.el" 
+          	  to="${build.dir}/gnu/jemacs/lisp/*.class"/>
           <srcfiles refid="jemacs-el"/>
         </uptodate>
       </and>
diff -rN -uN old-work/kawa/ChangeLog new-work/kawa/ChangeLog
--- ChangeLog	2005-05-27 21:58:07.344704206 +0200
+++ ChangeLog	2005-05-27 21:14:29.000000000 +0200
@@ -1,3 +1,9 @@
+2005-05-27  Christian Surlykke <christian@surlykke.dk>
+
+	* build.xml: Make mappers insider uptodate elements take build.dir
+	property into account.
+	* build.properties: Use basedir in template for build.dir property.
+	
 2005-05-19  Per Bothner  <per@bothner.com>
 
 	* kawa/lang/Lambda.java (rewriteBody): Split up call to Compilation's


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]