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