Thu, 07 Jun 2012 20:30:49 -0700
7170079: Adjustments to build-infra makefiles
Reviewed-by: ohair, ohrstrom, ihse, jonas
Contributed-by: jonas <jonas.oreland@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>
ohair@299 | 1 | # |
ohair@299 | 2 | # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
ohair@299 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ohair@299 | 4 | # |
ohair@299 | 5 | # This code is free software; you can redistribute it and/or modify it |
ohair@299 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@299 | 7 | # published by the Free Software Foundation. Oracle designates this |
ohair@299 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@299 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
ohair@299 | 10 | # |
ohair@299 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
ohair@299 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ohair@299 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ohair@299 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
ohair@299 | 15 | # accompanied this code). |
ohair@299 | 16 | # |
ohair@299 | 17 | # You should have received a copy of the GNU General Public License version |
ohair@299 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
ohair@299 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ohair@299 | 20 | # |
ohair@299 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@299 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@299 | 23 | # questions. |
ohair@299 | 24 | # |
ohair@299 | 25 | |
erikj@310 | 26 | # This must be the first rule |
erikj@310 | 27 | default: all |
erikj@310 | 28 | |
ohair@299 | 29 | include $(SPEC) |
ohair@299 | 30 | include MakeBase.gmk |
ohair@299 | 31 | include JavaCompilation.gmk |
ohair@299 | 32 | |
ohair@299 | 33 | JAVAC_JARS ?= -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \ |
ohair@299 | 34 | -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar |
ohair@299 | 35 | DISABLE_JAXWS_WARNINGS:=-Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static |
ohair@299 | 36 | |
ohair@299 | 37 | # The generate new bytecode uses the new compiler for to generate bytecode |
ohair@299 | 38 | # for the new jdk that is being built. The code compiled by this setup |
ohair@299 | 39 | # cannot necessarily be run with the boot jdk. |
ohair@299 | 40 | $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG,\ |
ohair@299 | 41 | JVM:=$(JAVA),\ |
ohair@299 | 42 | JAVAC:=$(JAVAC_JARS),\ |
ohair@299 | 43 | FLAGS:=-Xprefer:source -XDignore.symbol.file=true -cp $(BOOT_JDK)/lib/tools.jar \ |
ohair@299 | 44 | $(DISABLE_JAXWS_WARNINGS) -g,\ |
ohair@299 | 45 | SERVER_DIR:=$(JAVAC_SERVERS),\ |
ohair@299 | 46 | SERVER_JVM:=$(SERVER_JAVA),\ |
ohair@299 | 47 | MODE:=$(JAVAC_USE_MODE),\ |
ohair@299 | 48 | USE_DEPS:=$(JAVAC_USE_DEPS))) |
ohair@299 | 49 | |
ohair@299 | 50 | # Dummy here is needed to trigger copying of META-INF |
ohair@299 | 51 | $(eval $(call SetupJavaCompilation,BUILD_JAF,\ |
ohair@299 | 52 | SETUP:=GENERATE_NEWBYTECODE_DEBUG,\ |
ohair@299 | 53 | SRC:=$(JAXWS_TOPDIR)/src/share/jaf_classes,\ |
ohair@299 | 54 | CLEAN:=.properties,\ |
ohair@299 | 55 | COPY:="dummy",\ |
ohair@299 | 56 | BIN:=$(JAXWS_OUTPUTDIR)/jaf_classes)) |
ohair@299 | 57 | |
ohair@299 | 58 | $(eval $(call SetupJavaCompilation,BUILD_JAXWS,\ |
ohair@299 | 59 | SETUP:=GENERATE_NEWBYTECODE_DEBUG,\ |
ohair@299 | 60 | SRC:=$(JAXWS_TOPDIR)/src/share/jaxws_classes,\ |
ohair@299 | 61 | CLEAN:=.properties,\ |
ohair@299 | 62 | BIN:=$(JAXWS_OUTPUTDIR)/jaxws_classes,\ |
ohair@299 | 63 | COPY:=.xsd,\ |
ohair@299 | 64 | COPY_FILES:=$(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \ |
ohair@299 | 65 | $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java,\ |
ohair@299 | 66 | ADD_JAVAC_FLAGS=-cp $(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar)) |
ohair@299 | 67 | |
ohair@299 | 68 | $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \ |
ohair@299 | 69 | $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin |
ohair@299 | 70 | mkdir -p $(@D) |
ohair@299 | 71 | cp $< $@ |
ohair@299 | 72 | |
ohair@299 | 73 | $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin: \ |
ohair@299 | 74 | $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin |
ohair@299 | 75 | mkdir -p $(@D) |
ohair@299 | 76 | cp $< $@ |
ohair@299 | 77 | |
ohair@299 | 78 | # There are two META-INF services files that are needed, add these to the list of goals |
ohair@299 | 79 | BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \ |
ohair@299 | 80 | $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin |
ohair@299 | 81 | |
ohair@299 | 82 | $(eval $(call SetupArchive,ARCHIVE_JAXWS,$(BUILD_JAXWS) $(BUILD_JAF),\ |
ohair@299 | 83 | SRCS:=$(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes,\ |
ohair@299 | 84 | SUFFIXES:=.class .properties .xsd .java \ |
ohair@299 | 85 | com.sun.mirror.apt.AnnotationProcessorFactory \ |
ohair@299 | 86 | com.sun.tools.internal.xjc.Plugin,\ |
ohair@299 | 87 | JAR:=$(JAXWS_OUTPUTDIR)/dist/lib/classes.jar)) |
ohair@299 | 88 | |
ohair@299 | 89 | $(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES,\ |
ohair@299 | 90 | SRC:=$(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes,\ |
ohair@299 | 91 | ZIP:=$(JAXWS_OUTPUTDIR)/dist/lib/src.zip)) |
ohair@299 | 92 | |
ohair@299 | 93 | all: $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar $(JAXWS_OUTPUTDIR)/dist/lib/src.zip |
ohair@299 | 94 | |
ohair@299 | 95 | .PHONY: default all |