ohair@334: # erikj@347: # Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. ohair@334: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@334: # ohair@334: # This code is free software; you can redistribute it and/or modify it ohair@334: # under the terms of the GNU General Public License version 2 only, as ohair@334: # published by the Free Software Foundation. Oracle designates this ohair@334: # particular file as subject to the "Classpath" exception as provided ohair@334: # by Oracle in the LICENSE file that accompanied this code. ohair@334: # ohair@334: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@334: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@334: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@334: # version 2 for more details (a copy is included in the LICENSE file that ohair@334: # accompanied this code). ohair@334: # ohair@334: # You should have received a copy of the GNU General Public License version ohair@334: # 2 along with this work; if not, write to the Free Software Foundation, ohair@334: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@334: # ohair@334: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@334: # or visit www.oracle.com if you need additional information or have any ohair@334: # questions. ohair@334: # ohair@334: ohair@334: # This must be the first rule ohair@334: default: all ohair@334: ohair@334: include $(SPEC) ohair@334: include MakeBase.gmk ohair@334: include JavaCompilation.gmk ohair@334: ihse@412: DISABLE_JAXWS_WARNINGS := -Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static ohair@334: ohair@334: # The generate new bytecode uses the new compiler for to generate bytecode ohair@334: # for the new jdk that is being built. The code compiled by this setup ohair@334: # cannot necessarily be run with the boot jdk. ihse@412: $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \ ihse@412: JVM := $(JAVA), \ ihse@412: JAVAC := $(NEW_JAVAC), \ ihse@412: FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \ ihse@412: SERVER_DIR := $(SJAVAC_SERVER_DIR), \ ihse@412: SERVER_JVM := $(SJAVAC_SERVER_JAVA))) ohair@334: ohair@334: # Dummy here is needed to trigger copying of META-INF ihse@412: $(eval $(call SetupJavaCompilation,BUILD_JAF, \ ihse@412: SETUP := GENERATE_NEWBYTECODE_DEBUG, \ ihse@412: SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes, \ ihse@412: COPY := "dummy", \ ihse@412: BIN := $(JAXWS_OUTPUTDIR)/jaf_classes)) ohair@334: ihse@412: $(eval $(call SetupJavaCompilation,BUILD_JAXWS, \ ihse@412: SETUP := GENERATE_NEWBYTECODE_DEBUG, \ ihse@412: SRC := $(JAXWS_TOPDIR)/src/share/jaxws_classes, \ ihse@412: BIN := $(JAXWS_OUTPUTDIR)/jaxws_classes, \ ihse@412: COPY := .xsd, \ ihse@412: COPY_FILES := $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \ ihse@412: $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \ ihse@412: $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml, \ simonis@430: ADD_JAVAC_FLAGS = -Xbootclasspath/p:$(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar)) ohair@334: ohair@334: $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \ ihse@412: $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin ohair@334: mkdir -p $(@D) ohair@334: cp $< $@ ohair@334: ohair@334: $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin: \ ihse@412: $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin ohair@334: mkdir -p $(@D) ohair@334: cp $< $@ ohair@334: ohair@334: # There are two META-INF services files that are needed, add these to the list of goals ohair@334: BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \ ohair@334: $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin ohair@334: ihse@412: # Imitate the property cleaning mechanism in the old build. This will likely be replaced erikj@347: # by the unified functionality in JavaCompilation.gmk, but keep it the same as old build erikj@347: # for now, even though it actually breaks properties containing # in the value. erikj@347: # Using nawk to avoid solaris sed. erikj@347: $(JAXWS_OUTPUTDIR)/jaxws_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaxws_classes/%.properties erikj@347: $(MKDIR) -p $(@D) erikj@347: $(RM) $@ $@.tmp erikj@347: $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp erikj@347: $(MV) $@.tmp $@ erikj@347: erikj@347: JAXWS_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaxws_classes -name "*.properties") ihse@412: TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%, \ ihse@412: $(JAXWS_OUTPUTDIR)/jaxws_classes/%, $(JAXWS_SRC_PROP_FILES)) erikj@347: erikj@347: $(JAXWS_OUTPUTDIR)/jaf_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaf_classes/%.properties erikj@347: $(MKDIR) -p $(@D) erikj@347: $(RM) $@ $@.tmp erikj@347: $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp erikj@347: $(MV) $@.tmp $@ erikj@347: erikj@347: JAF_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaf_classes -name "*.properties") ihse@412: TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%, \ ihse@412: $(JAXWS_OUTPUTDIR)/jaf_classes/%, $(JAF_SRC_PROP_FILES)) erikj@347: ihse@412: $(eval $(call SetupArchive,ARCHIVE_JAXWS, $(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES), \ ihse@412: SRCS := $(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes, \ ihse@412: SUFFIXES := .class .properties .xsd .xml .java \ ihse@412: com.sun.mirror.apt.AnnotationProcessorFactory \ ihse@412: com.sun.tools.internal.xjc.Plugin, \ ihse@412: JAR := $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar)) ohair@334: ihse@412: $(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES, \ ihse@412: SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes, \ ihse@412: ZIP := $(JAXWS_OUTPUTDIR)/dist/lib/src.zip)) ohair@334: ohair@334: all: $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar $(JAXWS_OUTPUTDIR)/dist/lib/src.zip ohair@334: ihse@412: .PHONY: default all