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