Changeset: 2dda656b44de for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2dda656b44de
Modified Files:
        buildtools/autogen/autogen/am.py
        buildtools/autogen/autogen/msc.py
Branch: Jul2012
Log Message:

autogen: build ant targets in their own directory

To avoid concurrency issues for targets that depend on the same sources,
build each target in its own directory, such that classes can be
recompiled in isolation.  This hopefully fixes the random build errors
during nightly testing on compiling the Java sources using ant.


diffs (24 lines):

diff --git a/buildtools/autogen/autogen/am.py b/buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py
+++ b/buildtools/autogen/autogen/am.py
@@ -1037,7 +1037,7 @@ def am_ant(fd, var, ant, am):
     if ant.has_key("COND"):
         fd.write("\nif " + ant["COND"][0] +"\n\n")
 
-    fd.write("\n%s_ant_target:\n\t\"$(ANT)\" -f \"`$(anttranslatepath) 
$(srcdir)/build.xml`\" -Dbuilddir=\"`$(anttranslatepath) $(PWD)`\" 
-Djardir=\"`$(anttranslatepath) $(PWD)`\" -Dbasedir=\"`$(anttranslatepath) 
$(srcdir)`\" %s\n" % (target, target))
+    fd.write("\n%s_ant_target:\n\t\"$(ANT)\" -f \"`$(anttranslatepath) 
$(srcdir)/build.xml`\" -Dbuilddir=\"`$(anttranslatepath) $(PWD)/%s`\" 
-Djardir=\"`$(anttranslatepath) $(PWD)`\" -Dbasedir=\"`$(anttranslatepath) 
$(srcdir)`\" %s\n" % (target, target, target))
 
     for file in ant['FILES']:
         sfile = file.replace(".", "_")
diff --git a/buildtools/autogen/autogen/msc.py 
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -1055,7 +1055,7 @@ def msc_ant(fd, var, ant, msc):
     fd.write("callant%d.bat:\n" % callantno)
     fd.write("\techo @set thisdir=%%~dp0>callant%d.bat\n" % callantno)
     fd.write("\techo @set thisdir=%%thisdir:~0,-1%%>>callant%d.bat\n" % 
callantno)
-    fd.write("\techo @$(ANT) -f $(srcdir)\\build.xml 
\"-Dbuilddir=%%thisdir%%\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" % 
(target, callantno))
+    fd.write("\techo @$(ANT) -f $(srcdir)\\build.xml 
\"-Dbuilddir=%%thisdir%%\\%s\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" % 
(target, target, callantno))
     fd.write("%s_ant_target: callant%d.bat\n" % (target, callantno))
     fd.write("\tcallant%d.bat\n" % callantno)
     callantno = callantno + 1
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to