Makefile revision 171
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This code is free software; you can redistribute it and/or modify it
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# under the terms of the GNU General Public License version 2 only, as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# published by the Free Software Foundation. Sun designates this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# particular file as subject to the "Classpath" exception as provided
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# by Sun in the LICENSE file that accompanied this code.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This code is distributed in the hope that it will be useful, but WITHOUT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# version 2 for more details (a copy is included in the LICENSE file that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# accompanied this code).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# You should have received a copy of the GNU General Public License version
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# 2 along with this work; if not, write to the Free Software Foundation,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# CA 95054 USA or visit www.sun.com if you need additional information or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# have any questions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Makefile for langtools: wrapper around Ant build.xml file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# On Solaris, the 'make' utility from Sun will not work with these makefiles.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This little rule is only understood by Sun's make, and is harmless
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# when seen by the GNU make tool. If using Sun's make, this causes the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# make command to fail.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Minimal platform defs
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Need FullPath because we can't rely on gnumake abspath, until we use v3.81
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Makefile args
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# and the somewhat misnamed CLASS_VERSION (-target NN)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#ABS_OUTPUTDIR = $(abspath $(OUTPUTDIR))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncANT_OPTS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(error $(ANT) not found -- please update ANT_HOME)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ifneq ($(shell test -x "`which $(ANT)`" && echo OK), OK)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(error 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Default target and expected 'do everything' target
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Standard make clobber target
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# All ant targets of interest
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncANT_TARGETS = build clean sanity post-sanity diagnostics # for now
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Create a make target for each
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $(OUTPUTDIR)/build/ant-diagnostics.log
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#-------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Targets for Sun's internal JPRT build system
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncJPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncjprt_build_product jprt_build_debug jprt_build_fastdebug: all
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#-------------------------------------------------------------------
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Declare these phony (not filenames)