Makefile revision 0
2521N/A#
2521N/A# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
2521N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2521N/A#
2521N/A# This code is free software; you can redistribute it and/or modify it
2521N/A# under the terms of the GNU General Public License version 2 only, as
2521N/A# published by the Free Software Foundation. Sun designates this
2521N/A# particular file as subject to the "Classpath" exception as provided
2521N/A# by Sun in the LICENSE file that accompanied this code.
2521N/A#
2521N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2521N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2521N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2521N/A# version 2 for more details (a copy is included in the LICENSE file that
2521N/A# accompanied this code).
2521N/A#
2521N/A# You should have received a copy of the GNU General Public License version
2521N/A# 2 along with this work; if not, write to the Free Software Foundation,
2521N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2521N/A#
2521N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2521N/A# CA 95054 USA or visit www.sun.com if you need additional information or
5403N/A# have any questions.
2521N/A#
3998N/A
2521N/A# Makefile for jaxws: wrapper around Ant build.xml file
2521N/A
2521N/A#
6850N/A# On Solaris, the 'make' utility from Sun will not work with these makefiles.
6850N/A# This little rule is only understood by Sun's make, and is harmless
6850N/A# when seen by the GNU make tool. If using Sun's make, this causes the
2521N/A# make command to fail.
2521N/A#
2521N/ASUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
6850N/A
6850N/Aifdef QUIET
3533N/A ANT_OPTIONS += -quiet
2521N/Aendif
2521N/A
2521N/Aifdef VERBOSE
6850N/A ANT_OPTIONS += -verbose
2899N/Aendif
5425N/A
5425N/Aifdef JDK_VERSION
3817N/A ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
3817N/Aendif
3817N/A
2521N/Aifdef FULL_VERSION
2521N/A ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
2521N/Aendif
2521N/A
2521N/Aifdef MILESTONE
4049N/A ANT_OPTIONS += -Dmilestone=$(MILESTONE)
2521N/Aendif
2521N/A
3998N/Aifdef BUILD_NUMBER
2521N/A ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
3998N/Aelse
3998N/A ifdef JDK_BUILD_NUMBER
3998N/A ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
3998N/A endif
3998N/Aendif
2521N/A
2521N/Aifeq ($(VARIANT), DBG)
3998N/A ANT_OPTIONS += -Djavac.debug=true
3998N/Aelse
3998N/A ifeq ($(VARIANT), OPT)
3998N/A ANT_OPTIONS += -Djavac.debug=false
3998N/A endif
3998N/Aendif
3998N/A
2521N/A# Note: j2se/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
2521N/A# and the somewhat misnamed CLASS_VERSION (-target NN)
2521N/Aifdef TARGET_CLASS_VERSION
2521N/A ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
2521N/Aelse
2521N/A ifdef JAVAC_TARGET_ARG
2521N/A ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
2521N/A endif
5403N/Aendif
4337N/A
2521N/Aifdef ALT_BOOTDIR
4285N/A ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
4049N/Aendif
5403N/A
4049N/Aifdef ALT_OUTPUTDIR
4049N/A OUTPUTDIR = $(ALT_OUTPUTDIR)
5403N/A ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
5403N/A ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
5403N/Aelse
4049N/A OUTPUTDIR = ..
4049N/Aendif
3817N/AABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
ifdef ALT_LANGTOOLS_DIST
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
endif
ifdef FINDBUGS_HOME
ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
endif
ifdef ANT_HOME
ANT = $(ANT_HOME)/bin/ant
ifneq ($(shell test -x $(ANT); echo $$?), 0)
$(error "$(ANT) not found; please update ANT_HOME")
endif
else
ANT = ant
ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
$(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH")
endif
endif
# Default target and expected 'do everything' target
all: build
# Standard make clobber target
clobber: clean
# All ant targets of interest
ANT_TARGETS = build clean sanity # for now
# Create a make target for each
$(ANT_TARGETS):
$(ANT_JAVA_HOME) $(ANT) -version
$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
# Targets for Sun's internal JPRT build system
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
# Declare these phony (not filenames)
.PHONY: $(ANT_TARGETS) all clobber \
jprt_build_product jprt_build_debug jprt_build_fastdebug