public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] build.xml tweak to select-java targets
@ 2015-06-02 23:45 Jamison Hope
  2015-06-03  1:05 ` Per Bothner
  0 siblings, 1 reply; 2+ messages in thread
From: Jamison Hope @ 2015-06-02 23:45 UTC (permalink / raw)
  To: kawa@sourceware.org list

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

The attached patch tweaks the -maybe-select-java* targets to have both
"if" and "unless" attributes.  This ensures that only one of them is
enabled at a time, so the preprocessing only happens once.

Currently (without this patch), if building with JDK 1.7, the
preprocessor first edits all the files to set up for JAVA6, then again
for JAVA7.  If building with JDK 1.8, it preprocesses three times, for
JAVA6, then JAVA7, then JAVA8.

The extra steps are harmless, in that they cancel each other out, but
they affect file modification times, making javac recompile files that
it didn't really need to.

--
Jamison Hope
The PTR Group
www.theptrgroup.com



[-- Attachment #2: build-xml-java-selection.patch --]
[-- Type: application/octet-stream, Size: 1693 bytes --]

Index: build.xml
===================================================================
--- build.xml	(revision 8484)
+++ build.xml	(working copy)
@@ -385,19 +385,19 @@
   <target name="-maybe-select-java1" unless="has-java2">
     <antcall target="select-java1"/>
   </target>
-  <target name="-maybe-select-java2" unless="has-java4">
+  <target name="-maybe-select-java2" if="has-java2" unless="has-java4">
     <antcall target="select-java2"/>
   </target>
-  <target name="-maybe-select-java4" unless="has-java5">
+  <target name="-maybe-select-java4" if="has-java4" unless="has-java5">
     <antcall target="select-java4"/>
   </target>
-  <target name="-maybe-select-java5" unless="has-java6">
+  <target name="-maybe-select-java5" if="has-java5" unless="has-java6">
     <antcall target="select-java5"/>
   </target>
-  <target name="-maybe-select-java6" if="has-java6">
+  <target name="-maybe-select-java6" if="has-java6" unless="has-java7">
     <antcall target="select-java6"/>
   </target>
-  <target name="-maybe-select-java7" if="has-java7">
+  <target name="-maybe-select-java7" if="has-java7" unless="has-java8">
     <antcall target="select-java7"/>
   </target>
   <target name="-maybe-select-java8" if="has-java8">
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 8484)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2015-06-02  Jamison Hope  <jrh@theptrgroup.com>
+
+	* build.xml (-maybe-select-java{2,4,5,6,7}): Use both "if" and
+	"unless" attributes so that only one of the select-java* targets
+	gets called.
+
 2015-05-19  Jamison Hope  <jrh@theptrgroup.com>
 
 	* build.xml (has-java{2,4,5,6,7,8}): Move out of

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] build.xml tweak to select-java targets
  2015-06-02 23:45 [PATCH] build.xml tweak to select-java targets Jamison Hope
@ 2015-06-03  1:05 ` Per Bothner
  0 siblings, 0 replies; 2+ messages in thread
From: Per Bothner @ 2015-06-03  1:05 UTC (permalink / raw)
  To: kawa



On 06/02/2015 04:45 PM, Jamison Hope wrote:
> The attached patch tweaks the -maybe-select-java* targets to have both
> "if" and "unless" attributes.  This ensures that only one of them is
> enabled at a time, so the preprocessing only happens once.

Thanks - checked in.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-03  1:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 23:45 [PATCH] build.xml tweak to select-java targets Jamison Hope
2015-06-03  1:05 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).