Makefile revision 1010
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 for langtools: wrapper around Ant build.xml file
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# On Solaris, the standard 'make' utility will not work with these makefiles.
0d9c389e9c63d02edb068917d49af2fa8012af91marc# This little rule is only understood by Solaris make, and is harmless
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# when seen by the GNU make tool. If using Solaris 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
4cbb3bcf66a6788196bcc7244e4e36705acfbb57rbb# Where is unwanted output to be delivered?
a91a466a0d812a522d492c3c182163f73591ca20aaron# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
105475009f541187ba7a14a367547d9404c578befielding# Makefile args
95d00ea81131488769296fa5765ed745cbf45207trawick ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# and the somewhat misnamed CLASS_VERSION (-target NN)
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
b9e4a86f22b3e8666186b9fe08e9241cdaf50d26manoj# To facilitate bootstrapping, much of langtools can be compiled with (just)
d6baa4df51dd4759e4a7d26d3c864d7ef20e08bcmanoj# 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,
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# in which case it will automatically generate stub files for the new JDK API.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#ABS_OUTPUTDIR = $(abspath $(OUTPUTDIR))
1606d7656cbc08d3f3777edbdec4a7e4f9ede0a8rbb ifneq ($(shell test -x "`which $(ANT)`" && echo OK), OK)
6ca0e6973c8176100f4a426444823ae5e777e28fsascha $(error 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH)
832935ea1f5cc1b21d72674929eef16ed80437d6martin# Default target and expected 'do everything' target
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Standard make clobber target
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# All ant targets of interest
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaANT_TARGETS = build clean sanity post-sanity diagnostics build-all-tools # for now
d0211374a981173d4537e3f919c708b5f64040fcgstein# Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
d0211374a981173d4537e3f919c708b5f64040fcgstein $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $@ ; \
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbb# Create a make target for each
d0211374a981173d4537e3f919c708b5f64040fcgstein $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@
d0211374a981173d4537e3f919c708b5f64040fcgstein#-------------------------------------------------------------------
d0211374a981173d4537e3f919c708b5f64040fcgstein# Targets for Oracle's internal JPRT build system
7a9190dfde3a06f271dc6c4f4830c1a5440efef8fanfJPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
71cd8b65badad4cda51aa7eaba1dea44f78190c7jerenkrantzjprt_build_product jprt_build_debug jprt_build_fastdebug: all
71cd8b65badad4cda51aa7eaba1dea44f78190c7jerenkrantz $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
71cd8b65badad4cda51aa7eaba1dea44f78190c7jerenkrantz#-------------------------------------------------------------------
71cd8b65badad4cda51aa7eaba1dea44f78190c7jerenkrantz# Declare these phony (not filenames)