changeset 2275:74cfd211da47

Fix circularity in extracting and patching the JAXWS sources. 2010-06-25 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: (OPENJDK_BOOT_TREE): Set to patch-jaxws.stamp. (extract-jaxws): Don't depend circularly on OPENJDK_BOOT_TREE, just on the needed drops and OpenJDK tree. Only extract source, move patching to another target due to dependencies. (patch-jaxws): Patching segment of extract-jaxws. Depends on patch-boot and thus on the openjdk-boot tree. (clean-patch-jaxws): Cleanup for above.
author Andrew John Hughes <ahughes@redhat.com>
date Sun, 27 Jun 2010 22:57:18 +0100
parents 1d83df258409
children 60b7879c73d7
files ChangeLog Makefile.am
diffstat 2 files changed, 79 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 25 10:29:19 2010 +0100
+++ b/ChangeLog	Sun Jun 27 22:57:18 2010 +0100
@@ -1,3 +1,16 @@
+2010-06-25 Andrew John Hughes  <ahughes@redhat.com>
+
+	* Makefile.am:
+	(OPENJDK_BOOT_TREE): Set to patch-jaxws.stamp.
+	(extract-jaxws): Don't depend circularly on
+	OPENJDK_BOOT_TREE, just on the needed drops
+	and OpenJDK tree.  Only extract source, move
+	patching to another target due to dependencies.
+	(patch-jaxws): Patching segment of extract-jaxws.
+	Depends on patch-boot and thus on the openjdk-boot
+	tree.
+	(clean-patch-jaxws): Cleanup for above.
+
 2010-06-25 Andrew John Hughes  <ahughes@redhat.com>
 
 	PR icedtea/512:
--- a/Makefile.am	Fri Jun 25 10:29:19 2010 +0100
+++ b/Makefile.am	Sun Jun 27 22:57:18 2010 +0100
@@ -251,7 +251,7 @@
 # Target to ensure a patched OpenJDK bootstrap tree containing
 # Zero & Shark, any other overlays and the bootstrapping patches
 # is available in $(abs_top_builddir)/openjdk-boot
-OPENJDK_BOOT_TREE = stamps/patch-boot.stamp
+OPENJDK_BOOT_TREE = stamps/patch-jaxws.stamp
 
 # Sources list
 
@@ -1259,45 +1259,15 @@
 clean-extract-cacao: clean-cacao
 	rm -f stamps/extract-cacao.stamp
 
-stamps/extract-jaxws.stamp: $(OPENJDK_BOOT_TREE) \
-  stamps/download-jaxws-drop.stamp stamps/download-jaf-drop.stamp
+stamps/extract-jaxws.stamp: stamps/download-jaxws-drop.stamp \
+ stamps/download-jaf-drop.stamp stamps/extract-openjdk.stamp
 	set -e ; \
 	if test "x$(NEED_JAXWS_SRC)" = "xtrue"; then \
-	  (cd openjdk-boot/jaxws ; \
+	  (cd openjdk/jaxws ; \
 	   $(ANT) -Ddrops.dir=$(abs_top_builddir)/drops \
-	   -Doutput.dir=$(BOOT_BUILD_OUTPUT_DIR)/jaxws \
-	   source ; \
-	   cd $(abs_top_builddir)) ; \
+	   -Doutput.dir=$(BUILD_OUTPUT_DIR)/jaxws \
+	   source ; ) \
 	fi
-if DTDTYPE_QNAME
-	set -e ; \
-	(cd $(BOOT_BUILD_OUTPUT_DIR)/jaxws; \
-	 all_patches_ok=yes; \
-	 for p in $(JAXWS_PATCHES) ; \
-	 do \
-	   if test x$${all_patches_ok} = "xyes" \
-	     && echo Checking $$p \
-	     && $(PATCH) -l -p0 --dry-run -s -t -f \
-	       -F 0 < $(abs_top_srcdir)/$$p ; \
-	   then \
-	    echo Applying $$p ; \
-	    $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \
-	    if ! grep "^\* $$(basename $$p)" $(abs_top_srcdir)/HACKING \
-	      >> $(abs_top_builddir)/stamps/extract-jaxws.stamp.tmp ; \
-	    then \
-	      echo "* $$(basename $$p): UNDOCUMENTED" \
-	        >> $(abs_top_builddir)/stamps/extract-jaxws.stamp.tmp ; \
-	    fi ; \
-	   else \
-	     test x$${all_patches_ok} = "xyes" && all_patches_ok=$$p ; \
-	   fi ; \
-	 done ; \
-	 if ! test x$${all_patches_ok} = "xyes"; then \
-	   echo ERROR patch $${all_patches_ok} FAILED! ; \
-	   echo WARNING make clean-extract-jaxws before retrying a fix ; \
-	   exit 2; \
-	 fi )
-endif
 	mkdir -p stamps
 	touch $@
 
@@ -1601,6 +1571,64 @@
 	  rm -f stamps/patch-boot.stamp ; \
 	fi
 
+stamps/patch-jaxws.stamp: stamps/patch-boot.stamp
+	mkdir -p stamps
+	rm -f stamps/patch-jaxws.stamp.tmp
+	touch stamps/patch-jaxws.stamp.tmp
+if DTDTYPE_QNAME
+	set -e ; \
+	(cd $(BOOT_BUILD_OUTPUT_DIR)/jaxws;o \
+	 all_patches_ok=yes; \
+	 for p in $(JAXWS_PATCHES) ; \
+	 do \
+	   if test x$${all_patches_ok} = "xyes" \
+	     && echo Checking $$p \
+	     && $(PATCH) -l -p0 --dry-run -s -t -f \
+	       -F 0 < $(abs_top_srcdir)/$$p ; \
+	   then \
+	    echo Applying $$p ; \
+	    $(PATCH) -l -p0 < $(abs_top_srcdir)/$$p ; \
+	    if ! grep "^\* $$(basename $$p)" $(abs_top_srcdir)/HACKING \
+	      >> $(abs_top_builddir)/stamps/patch-jaxws.stamp.tmp ; \
+	    then \
+	      echo "* $$(basename $$p): UNDOCUMENTED" \
+	        >> $(abs_top_builddir)/stamps/patch-jaxws.stamp.tmp ; \
+	    fi ; \
+	   else \
+	     test x$${all_patches_ok} = "xyes" && all_patches_ok=$$p ; \
+	   fi ; \
+	 done ; \
+	 if ! test x$${all_patches_ok} = "xyes"; then \
+	   echo ERROR patch $${all_patches_ok} FAILED! ; \
+	   echo WARNING make clean-patch-jaxws before retrying a fix ; \
+	   exit 2; \
+	 fi )
+endif
+	mv stamps/patch-jaxws.stamp.tmp stamps/patch-jaxws.stamp
+
+clean-patch-jaxws:
+if DTDTYPE_QNAME
+	if [ -e stamps/patch-jaxws.stamp ] ; then \
+	  all_patches_ok=yes; \
+	  cd $(BOOT_BUILD_OUTPUT_DIR)/jaxws; \
+	  for p in $(JAXWS_PATCHES) ; \
+	  do \
+	    echo Checking $$p ; \
+	    if $(PATCH) -l -p0 -R --dry-run -s -t -f < $(abs_top_srcdir)/$$p ; \
+	    then \
+	      echo Reverting $$p ; \
+	      $(PATCH) -l -p0 -R < $(abs_top_srcdir)/$$p ; \
+	    else \
+	      all_patches_ok=no ; \
+	    fi ; \
+	  done ; \
+	  if ! test x$${all_patches_ok} = "xyes" ; then \
+	    echo "WARNING Not all patches reverted cleanly" ; \
+	  fi ; \
+	fi
+endif
+	rm -f stamps/patch-jaxws.stamp
+
 # Bootstrap Directory Targets
 # ===========================
 
@@ -2576,6 +2604,8 @@
 
 patch-fsg: stamps/patch-fsg.stamp
 
+patch-jaxws: stamps/patch-jaxws.stamp
+
 plugin: stamps/plugin.stamp
 
 plugin-tests: stamps/plugin-tests.stamp