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