8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
authorerikj
Fri, 04 Jan 2013 11:31:32 +0100
changeset 15160 ee1119ea8b2b
parent 14873 0d625373c69e
child 15161 00dc2a3c6137
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build Reviewed-by: ohair
jaxws/makefiles/BuildJaxws.gmk
--- a/jaxws/makefiles/BuildJaxws.gmk	Wed Jul 05 18:33:58 2017 +0200
+++ b/jaxws/makefiles/BuildJaxws.gmk	Fri Jan 04 11:31:32 2013 +0100
@@ -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 \