jaxws/makefiles/BuildJaxws.gmk

Print this page

        

@@ -1,7 +1,7 @@
 #
-# 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
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -46,18 +46,16 @@
 
 # Dummy here is needed to trigger copying of META-INF
 $(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 \
                             $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java,\
                 ADD_JAVAC_FLAGS=-cp $(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar))

@@ -74,11 +72,35 @@
 
 # There are two META-INF services files that are needed, add these to the list of goals
 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 \
                           com.sun.tools.internal.xjc.Plugin,\
                 JAR:=$(JAXWS_OUTPUTDIR)/dist/lib/classes.jar))