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