6938326: Use of "ant -diagnostics" a problem with ant 1.8.0, exit code 1 now
authorohair
Fri, 26 Mar 2010 22:37:04 -0700
changeset 5219 6765bf7b1023
parent 5218 066372a81ca9
child 5220 1386e31a7fd0
child 5319 63dc7f367a37
6938326: Use of "ant -diagnostics" a problem with ant 1.8.0, exit code 1 now Reviewed-by: jjg
langtools/make/Makefile
--- a/langtools/make/Makefile	Wed Mar 24 17:02:35 2010 -0700
+++ b/langtools/make/Makefile	Fri Mar 26 22:37:04 2010 -0700
@@ -188,10 +188,16 @@
 # All ant targets of interest
 ANT_TARGETS = build clean sanity post-sanity diagnostics # for now
 
+# Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
+$(OUTPUTDIR)/build/ant-diagnostics.log:
+	@mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR)
+	@$(RM) $@
+	$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $@ ; \
+	  $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -version >> $@
+
 # Create a make target for each
-$(ANT_TARGETS):
+$(ANT_TARGETS): $(OUTPUTDIR)/build/ant-diagnostics.log
 	@ mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR)
-	$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $(OUTPUTDIR)/build/ant-diagnostics.log
 	$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@
 
 #-------------------------------------------------------------------