Makefile revision 178
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# This code is free software; you can redistribute it and/or modify it
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# under the terms of the GNU General Public License version 2 only, as
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# published by the Free Software Foundation. Oracle designates this
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# particular file as subject to the "Classpath" exception as provided
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# by Oracle in the LICENSE file that accompanied this code.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# This code is distributed in the hope that it will be useful, but WITHOUT
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# version 2 for more details (a copy is included in the LICENSE file that
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# accompanied this code).
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# You should have received a copy of the GNU General Public License version
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# 2 along with this work; if not, write to the Free Software Foundation,
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# or visit www.oracle.com if you need additional information or have any
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# questions.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Makefile wrapper around Ant build.xml file
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# On Solaris, the 'make' utility from Sun will not work with these makefiles.
0d9c389e9c63d02edb068917d49af2fa8012af91marc# This little rule is only understood by Sun's make, and is harmless
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# when seen by the GNU make tool. If using Sun's make, this causes the
dadf206a4cf1eccf5c13b64bd9678610dd763868rbb# make command to fail.
a773226ea345018b49d45cf2e076ff2452eead5arbbSUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
305a68a1a5db3cc264077d89b3caa6f923257150fielding# and the somewhat misnamed CLASS_VERSION (-target NN)
105475009f541187ba7a14a367547d9404c578befielding ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
38d37e90b45f2a735e7aecf702c76159e0b9f58ftrawick ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
105475009f541187ba7a14a367547d9404c578befielding# If downloads are allowed
105475009f541187ba7a14a367547d9404c578befielding# Figure out the platform we are using
ce8d7a0627c0f246376cccd980463f8250a6a97ebjh# Where is /java in case we need it
e9ab76f3d59c1be02501c291554715e8155c7c81jorton# Do we have the drops already downloaded?
5d5073be0470140d32914de8e74d869ee4145bffjerenkrantz# Check ALT_DROPS_DIR for a full path first,
6552de06c3d34e6ecfad4c93a6604531b52caf63wsanchez# before trying to use the devtools path,
4b09621ec91a53c7b48114c37a84f0018cadcb34jerenkrantz# either via ALT_JDK_DEVTOOLS_DIR or /java/devtools.
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# Add in path to drops already downloaded
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
ec7f09808149aa3a0f9895c29025766d4961a044dougm $(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH")
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# Default target and expected 'do everything' target
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# All ant targets of interest
825ab8e480abebc9528fa3b580df41bc9ec4fbderbbANT_TARGETS = all source drop_included build dist clobber clean sanity
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Create a make target for each
0af3a77b888861a190b1701079a96469f323e661rbb cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) -version
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Help target
825ab8e480abebc9528fa3b580df41bc9ec4fbderbb @echo "----------------------------------------------------------"
cb5d3f2f217d457dada4883addb1dc9f3f17bb85fielding @echo "Help information for this Makefile:"
825ab8e480abebc9528fa3b580df41bc9ec4fbderbb @echo " Targets (see ant project information for descriptions):"
6ca0e6973c8176100f4a426444823ae5e777e28fsascha @echo " Environment or command line variables (all optional):"
6ca0e6973c8176100f4a426444823ae5e777e28fsascha "Directory that contains the drop source bundles i.e. drops.dir")
6ca0e6973c8176100f4a426444823ae5e777e28fsascha "if set makes sure ant property javac.debug is true")
8013f5d3fff948bf54b8df266e5fab613629b0c1jorton "if SOURCE_LANGUAGE_VERSION not set uses this to set ant property javac.source")
6ca0e6973c8176100f4a426444823ae5e777e28fsascha "if TARGET_CLASS_VERSION not set uses this to set ant property javac.target")
832935ea1f5cc1b21d72674929eef16ed80437d6martin "if set to OPT means optimized build will set javac.debug to false")
7bfe076b680e6e591add6cdc754ce9a6910682a2sascha @echo "----------------------------------------------------------"
6ca0e6973c8176100f4a426444823ae5e777e28fsascha @echo "Ant project file help information:"
6ca0e6973c8176100f4a426444823ae5e777e28fsascha @echo "----------------------------------------------------------"
d0211374a981173d4537e3f919c708b5f64040fcgstein# Targets for Sun's internal JPRT build system
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbbjprt_build_product jprt_build_debug jprt_build_fastdebug: all
d0211374a981173d4537e3f919c708b5f64040fcgstein# Declare these phony (not filenames)