You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2011/10/26 10:01:09 UTC
svn commit: r1189065 - /db/derby/code/trunk/build.xml
Author: kahatlen
Date: Wed Oct 26 08:01:09 2011
New Revision: 1189065
URL: http://svn.apache.org/viewvc?rev=1189065&view=rev
Log:
DERBY-5478: Speed up creation of bin scripts
- Execute chmod once instead of six times
- Don't regenerate the scripts unless the templates have changed
Modified:
db/derby/code/trunk/build.xml
Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1189065&r1=1189064&r2=1189065&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed Oct 26 08:01:09 2011
@@ -879,7 +879,7 @@
<!-- Build the Unix shell scripts under bin -->
<!-- =================================================================== -->
-<target name="binscripts">
+<target name="binscripts" depends="check-binscripts" unless="binscripts.done">
<antcall target="makebinscript">
<param name="script" value="dblook"/>
</antcall>
@@ -903,6 +903,10 @@
<antcall target="makebinscript">
<param name="script" value="stopNetworkServer"/>
</antcall>
+
+ <!-- All the scripts should be executable. -->
+ <chmod perm="+x" dir="${generated.bin.dir}" includes="*"/>
+
</target>
<target name="makebinscript">
@@ -910,7 +914,17 @@
<fileset file="bin/templates/derby_common.sh"/>
<fileset file="bin/templates/${script}"/>
</concat>
- <chmod perm="+x" file="${generated.bin.dir}/${script}"/>
+</target>
+
+<target name="check-binscripts">
+ <dependset>
+ <srcfileset file="bin/templates/derby_common.sh"/>
+ <targetfileset dir="${generated.bin.dir}"/>
+ </dependset>
+ <uptodate property="binscripts.done">
+ <srcfiles dir="bin/templates" excludes="derby_common.sh"/>
+ <globmapper from="*" to="${generated.bin.dir}/*"/>
+ </uptodate>
</target>
<!-- =================================================================== -->