Makefile revision 91
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
441d80aa4f613b6298fc8bd3151f4be02dbf84fclling# This code is free software; you can redistribute it and/or modify it
441d80aa4f613b6298fc8bd3151f4be02dbf84fclling# under the terms of the GNU General Public License version 2 only, as
fa9e4066f08beec538e775443c5be79dd423fcabahrens# published by the Free Software Foundation. Sun designates this
fa9e4066f08beec538e775443c5be79dd423fcabahrens# particular file as subject to the "Classpath" exception as provided
fa9e4066f08beec538e775443c5be79dd423fcabahrens# by Sun in the LICENSE file that accompanied this code.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# This code is distributed in the hope that it will be useful, but WITHOUT
fa9e4066f08beec538e775443c5be79dd423fcabahrens# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fa9e4066f08beec538e775443c5be79dd423fcabahrens# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fa9e4066f08beec538e775443c5be79dd423fcabahrens# version 2 for more details (a copy is included in the LICENSE file that
fa9e4066f08beec538e775443c5be79dd423fcabahrens# accompanied this code).
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You should have received a copy of the GNU General Public License version
fa9e4066f08beec538e775443c5be79dd423fcabahrens# 2 along with this work; if not, write to the Free Software Foundation,
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
b12a1c38fc215cc54fa6014069fd2b8dbb496646lling# CA 95054 USA or visit www.sun.com if you need additional information or
fa9e4066f08beec538e775443c5be79dd423fcabahrens# have any questions.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Makefile wrapper around Ant build.xml file
fa9e4066f08beec538e775443c5be79dd423fcabahrens# On Solaris, the 'make' utility from Sun will not work with these makefiles.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# This little rule is only understood by Sun's make, and is harmless
fa9e4066f08beec538e775443c5be79dd423fcabahrens# when seen by the GNU make tool. If using Sun's make, this causes the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# make command to fail.
fa9e4066f08beec538e775443c5be79dd423fcabahrensSUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
99653d4ee642c6528e88224f12409a5f23060994eschrock# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
99653d4ee642c6528e88224f12409a5f23060994eschrock# and the somewhat misnamed CLASS_VERSION (-target NN)
99653d4ee642c6528e88224f12409a5f23060994eschrock ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
99653d4ee642c6528e88224f12409a5f23060994eschrock ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
99653d4ee642c6528e88224f12409a5f23060994eschrock# Figure out the platform we are using
99653d4ee642c6528e88224f12409a5f23060994eschrock# Where is /java in case we need it
99653d4ee642c6528e88224f12409a5f23060994eschrock# Do we have the drops already downloaded?
99653d4ee642c6528e88224f12409a5f23060994eschrock# Check ALT_DROPS_DIR for a full path first,
99653d4ee642c6528e88224f12409a5f23060994eschrock# before trying to use the devtools path,
99653d4ee642c6528e88224f12409a5f23060994eschrock# either via ALT_JDK_DEVTOOLS_DIR or /java/devtools.
99653d4ee642c6528e88224f12409a5f23060994eschrock# Add in path to drops already downloaded
fa9e4066f08beec538e775443c5be79dd423fcabahrens ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
fa9e4066f08beec538e775443c5be79dd423fcabahrens ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH")
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Default target and expected 'do everything' target
fa9e4066f08beec538e775443c5be79dd423fcabahrens# All ant targets of interest
99653d4ee642c6528e88224f12409a5f23060994eschrockANT_TARGETS = all source drop_included build dist clobber clean sanity
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Create a make target for each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Help target
fa9e4066f08beec538e775443c5be79dd423fcabahrens @echo "----------------------------------------------------------"
fa9e4066f08beec538e775443c5be79dd423fcabahrens @echo "Help information for this Makefile:"
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock @echo " Targets (see ant project information for descriptions):"
fa9e4066f08beec538e775443c5be79dd423fcabahrens @echo " Environment or command line variables (all optional):"
fa9e4066f08beec538e775443c5be79dd423fcabahrens "if set makes sure ant property javac.debug is true")
fa9e4066f08beec538e775443c5be79dd423fcabahrens "if SOURCE_LANGUAGE_VERSION not set uses this to set ant property javac.source")
b81d61a68b235e0529ebadc18e14d9d1dd52a258lling "if TARGET_CLASS_VERSION not set uses this to set ant property javac.target")
fa9e4066f08beec538e775443c5be79dd423fcabahrens "if set to OPT means optimized build will set javac.debug to false")
eaca9bbd5f5d1e4e554da4c7108e8a03c8c33481eschrock @echo "----------------------------------------------------------"
fa9e4066f08beec538e775443c5be79dd423fcabahrens @echo "Ant project file help information:"
fa9e4066f08beec538e775443c5be79dd423fcabahrens @echo "----------------------------------------------------------"
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Targets for Sun's internal JPRT build system
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrockjprt_build_product jprt_build_debug jprt_build_fastdebug: all
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Declare these phony (not filenames)