Merge
authorkatleman
Wed, 16 Jan 2013 22:17:39 -0800
changeset 15163 f0f3e46c8780
parent 15159 2a928ef3978d (current diff)
parent 15162 d5c6242eb271 (diff)
child 15164 265b23a33c4e
Merge
--- a/jaxws/makefiles/BuildJaxws.gmk	Wed Jan 16 11:59:59 2013 -0800
+++ b/jaxws/makefiles/BuildJaxws.gmk	Wed Jan 16 22:17:39 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -48,14 +48,12 @@
 $(eval $(call SetupJavaCompilation,BUILD_JAF,\
 		SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
 		SRC:=$(JAXWS_TOPDIR)/src/share/jaf_classes,\
-		CLEAN:=.properties,\
 		COPY:="dummy",\
 		BIN:=$(JAXWS_OUTPUTDIR)/jaf_classes))
 
 $(eval $(call SetupJavaCompilation,BUILD_JAXWS,\
 		SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
 		SRC:=$(JAXWS_TOPDIR)/src/share/jaxws_classes,\
-		CLEAN:=.properties,\
 		BIN:=$(JAXWS_OUTPUTDIR)/jaxws_classes,\
 		COPY:=.xsd,\
 		COPY_FILES:=$(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \
@@ -76,7 +74,31 @@
 BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
                $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin
 
-$(eval $(call SetupArchive,ARCHIVE_JAXWS,$(BUILD_JAXWS) $(BUILD_JAF),\
+# Imitate the property cleaning mechanism in the old build. This will likely be replaced 
+# by the unified functionality in JavaCompilation.gmk, but keep it the same as old build
+# for now, even though it actually breaks properties containing # in the value.
+# Using nawk to avoid solaris sed.
+$(JAXWS_OUTPUTDIR)/jaxws_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaxws_classes/%.properties
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
+	$(MV) $@.tmp $@
+
+JAXWS_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaxws_classes -name "*.properties")
+TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%,\
+                       $(JAXWS_OUTPUTDIR)/jaxws_classes/%,$(JAXWS_SRC_PROP_FILES))
+
+$(JAXWS_OUTPUTDIR)/jaf_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaf_classes/%.properties
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
+	$(MV) $@.tmp $@
+
+JAF_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaf_classes -name "*.properties")
+TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%,\
+                       $(JAXWS_OUTPUTDIR)/jaf_classes/%,$(JAF_SRC_PROP_FILES))
+
+$(eval $(call SetupArchive,ARCHIVE_JAXWS,$(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES),\
 		SRCS:=$(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes,\
 		SUFFIXES:=.class .properties .xsd .java \
 			  com.sun.mirror.apt.AnnotationProcessorFactory \