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