make/BuildJaxws.gmk

Thu, 31 Aug 2017 15:18:52 +0800

author
aoqi
date
Thu, 31 Aug 2017 15:18:52 +0800
changeset 637
9c07ef4934dd
parent 439
1d1af4ce8eeb
parent 0
373ffda63c9a
permissions
-rw-r--r--

merge

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation. Oracle designates this
aoqi@0 8 # particular file as subject to the "Classpath" exception as provided
aoqi@0 9 # by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 #
aoqi@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 # accompanied this code).
aoqi@0 16 #
aoqi@0 17 # You should have received a copy of the GNU General Public License version
aoqi@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 #
aoqi@0 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 # or visit www.oracle.com if you need additional information or have any
aoqi@0 23 # questions.
aoqi@0 24 #
aoqi@0 25
aoqi@0 26 # This must be the first rule
aoqi@0 27 default: all
aoqi@0 28
aoqi@0 29 include $(SPEC)
aoqi@0 30 include MakeBase.gmk
aoqi@0 31 include JavaCompilation.gmk
aoqi@0 32
aoqi@0 33 DISABLE_JAXWS_WARNINGS := -Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static
aoqi@0 34
aoqi@0 35 # The generate new bytecode uses the new compiler for to generate bytecode
aoqi@0 36 # for the new jdk that is being built. The code compiled by this setup
aoqi@0 37 # cannot necessarily be run with the boot jdk.
aoqi@0 38 $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
aoqi@0 39 JVM := $(JAVA), \
aoqi@0 40 JAVAC := $(NEW_JAVAC), \
aoqi@0 41 FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \
aoqi@0 42 SERVER_DIR := $(SJAVAC_SERVER_DIR), \
aoqi@0 43 SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
aoqi@0 44
aoqi@0 45 # Dummy here is needed to trigger copying of META-INF
aoqi@0 46 $(eval $(call SetupJavaCompilation,BUILD_JAF, \
aoqi@0 47 SETUP := GENERATE_NEWBYTECODE_DEBUG, \
aoqi@0 48 SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes, \
aoqi@0 49 COPY := "dummy", \
aoqi@0 50 BIN := $(JAXWS_OUTPUTDIR)/jaf_classes))
aoqi@0 51
aoqi@0 52 $(eval $(call SetupJavaCompilation,BUILD_JAXWS, \
aoqi@0 53 SETUP := GENERATE_NEWBYTECODE_DEBUG, \
aoqi@0 54 SRC := $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
aoqi@0 55 BIN := $(JAXWS_OUTPUTDIR)/jaxws_classes, \
aoqi@0 56 COPY := .xsd, \
aoqi@0 57 COPY_FILES := $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \
aoqi@0 58 $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \
aoqi@0 59 $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml, \
aoqi@0 60 ADD_JAVAC_FLAGS = -Xbootclasspath/p:$(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar))
aoqi@0 61
aoqi@0 62 $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \
aoqi@0 63 $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
aoqi@0 64 mkdir -p $(@D)
aoqi@0 65 cp $< $@
aoqi@0 66
aoqi@0 67 $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin: \
aoqi@0 68 $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
aoqi@0 69 mkdir -p $(@D)
aoqi@0 70 cp $< $@
aoqi@0 71
aoqi@0 72 # There are two META-INF services files that are needed, add these to the list of goals
aoqi@0 73 BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
aoqi@0 74 $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin
aoqi@0 75
aoqi@0 76 # Imitate the property cleaning mechanism in the old build. This will likely be replaced
aoqi@0 77 # by the unified functionality in JavaCompilation.gmk, but keep it the same as old build
aoqi@0 78 # for now, even though it actually breaks properties containing # in the value.
aoqi@0 79 # Using nawk to avoid solaris sed.
aoqi@0 80 $(JAXWS_OUTPUTDIR)/jaxws_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaxws_classes/%.properties
aoqi@0 81 $(MKDIR) -p $(@D)
aoqi@0 82 $(RM) $@ $@.tmp
aoqi@0 83 $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
aoqi@0 84 $(MV) $@.tmp $@
aoqi@0 85
aoqi@0 86 JAXWS_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaxws_classes -name "*.properties")
aoqi@0 87 TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%, \
aoqi@0 88 $(JAXWS_OUTPUTDIR)/jaxws_classes/%, $(JAXWS_SRC_PROP_FILES))
aoqi@0 89
aoqi@0 90 $(JAXWS_OUTPUTDIR)/jaf_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaf_classes/%.properties
aoqi@0 91 $(MKDIR) -p $(@D)
aoqi@0 92 $(RM) $@ $@.tmp
aoqi@0 93 $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
aoqi@0 94 $(MV) $@.tmp $@
aoqi@0 95
aoqi@0 96 JAF_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaf_classes -name "*.properties")
aoqi@0 97 TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%, \
aoqi@0 98 $(JAXWS_OUTPUTDIR)/jaf_classes/%, $(JAF_SRC_PROP_FILES))
aoqi@0 99
aoqi@0 100 $(eval $(call SetupArchive,ARCHIVE_JAXWS, $(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES), \
aoqi@0 101 SRCS := $(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes, \
aoqi@0 102 SUFFIXES := .class .properties .xsd .xml .java \
aoqi@0 103 com.sun.mirror.apt.AnnotationProcessorFactory \
aoqi@0 104 com.sun.tools.internal.xjc.Plugin, \
aoqi@0 105 JAR := $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar))
aoqi@0 106
aoqi@0 107 $(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES, \
aoqi@0 108 SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
aoqi@0 109 ZIP := $(JAXWS_OUTPUTDIR)/dist/lib/src.zip))
aoqi@0 110
aoqi@0 111 all: $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar $(JAXWS_OUTPUTDIR)/dist/lib/src.zip
aoqi@0 112
aoqi@0 113 .PHONY: default all

mercurial