Makefile revision 440
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# particular file as subject to the "Classpath" exception as provided
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# CA 95054 USA or visit www.sun.com if you need additional information or
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# have any questions.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Makefile for langtools: 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# Minimal platform defs
ec9b5c4854a4055d00f5459dbbd879d517f1531dmartin# Need FullPath because we can't rely on gnumake abspath, until we use v3.81
105475009f541187ba7a14a367547d9404c578befielding# Makefile args
cb5d3f2f217d457dada4883addb1dc9f3f17bb85fielding ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
5d5073be0470140d32914de8e74d869ee4145bffjerenkrantz ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha# and the somewhat misnamed CLASS_VERSION (-target NN)
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# To facilitate bootstrapping, much of langtools can be compiled with (just)
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# a boot JDK. However, some source files need to be compiled against
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# new JDK API. In a bootstrap build, an import JDK may not be available,
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# so build.xml can also build against the source files in a jdk repo,
ec7f09808149aa3a0f9895c29025766d4961a044dougm# in which case it will automatically generate stub files for the new JDK API.
825ab8e480abebc9528fa3b580df41bc9ec4fbderbb#ABS_OUTPUTDIR = $(abspath $(OUTPUTDIR))
6ca0e6973c8176100f4a426444823ae5e777e28fsascha ifneq ($(shell test -x "`which $(ANT)`" && echo OK), OK)
5eb7c0254ac26350a5a471c23514152446d50bccjorton $(error 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH)
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Default target and expected 'do everything' target
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Standard make clobber target
d52ef6a778f70aae633080afeb3b8668005a07c7jerenkrantz# All ant targets of interest
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaANT_TARGETS = build clean sanity post-sanity diagnostics # for now
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Create a make target for each
6ca0e6973c8176100f4a426444823ae5e777e28fsascha $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $(OUTPUTDIR)/build/ant-diagnostics.log
6ca0e6973c8176100f4a426444823ae5e777e28fsascha $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#-------------------------------------------------------------------
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Targets for Sun's internal JPRT build system
0af58edfee6112cc3399e0e693340e525b96ab1ctrawickJPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
0af58edfee6112cc3399e0e693340e525b96ab1ctrawickjprt_build_product jprt_build_debug jprt_build_fastdebug: all
0af58edfee6112cc3399e0e693340e525b96ab1ctrawick#-------------------------------------------------------------------
0af58edfee6112cc3399e0e693340e525b96ab1ctrawick# Declare these phony (not filenames)