Makefile revision 214
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# This code is free software; you can redistribute it and/or modify it
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# under the terms of the GNU General Public License version 2 only, as
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# published by the Free Software Foundation. Sun designates this
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# particular file as subject to the "Classpath" exception as provided
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# by Sun in the LICENSE file that accompanied this code.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# This code is distributed in the hope that it will be useful, but WITHOUT
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# version 2 for more details (a copy is included in the LICENSE file that
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# accompanied this code).
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# You should have received a copy of the GNU General Public License version
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# 2 along with this work; if not, write to the Free Software Foundation,
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# CA 95054 USA or visit www.sun.com if you need additional information or
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# have any questions.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Makefile for building and packaging all of the JDK and the JRE. See
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# also included files.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make sure we are clear what the default target is
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Check target
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Help target
9040f019271f91b98e1320c0a8c38a42636e3979vboxsynchelp: intro_help target_help variable_help notes_help examples_help
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# Intro help message
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMakefile for the main JDK workspace. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDefault behavior is to use the BOOTDIR javac to bootstrap the build and \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimport in pre-built components like the VM from the JDK_IMPORT_PATH. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Target help
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync--- Common Targets --- \n\
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncall -- build the core JDK (default target) \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsynchelp -- Print out help information \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsynccheck -- Check make variable values for correctness \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncsanity -- Perform detailed sanity checks on system and settings \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncopenjdk -- synonym for 'OPENJDK=true all' \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncfastdebug -- build the core JDK in 'fastdebug' mode (-g -O) \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncdebug -- build the core JDK in 'debug' mode (-g) \n\
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsyncclean -- remove all built and imported files \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncclobber -- same as clean \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncdocs -- run javadoc to generate the JDK documentation \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimages -- build the jdk and jre image directories \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimport -- copy in the pre-built components (e.g. VM) \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimport_product -- copy in the product components \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimport_fastdebug -- copy in the fastdebug components \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncimport_debug -- copy in the debug components \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncsccs_get -- make sure all SCCS files are up-to-date (need SCCS) \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsynccreate_links -- create softlinks in Solaris 32bit build to 64bit dirs \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Variable help (only common ones used by this workspace)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_help: variable_help_intro variable_list variable_help_end
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# One line descriptions for the variables
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncLANGTOOLS_DIST.desc = langtools dist area used to build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncJDK_IMPORT_PATH.desc = JDK used to import components of the build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDEVTOOLS_PATH.desc = Directory containing zip and unzip
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables to print out (description and value)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables that should refer to directories that exist
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables that should refer to files that exist
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Some are windows specific
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# For pattern rules below, so all are treated the same
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Complete variable check
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for printing out a variable
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for checking to see if a variable with a directory exists
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @if [ ! -d $($*) ] ; then \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for checking to see if a variable with a file exists
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @if [ ! -f $($*) ] ; then \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Misc notes on help
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync--- Notes --- \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- All builds use same output directory unless overridden with \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync \t to use the clean target first. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- LANGTOOLS_DIST must refer to a langtools dist area, used to build. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- CORBA_DIST must refer to a corba dist area. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- JAXP_DIST must refer to a jaxp dist area. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- JAXWS_DIST must refer to a jaxws dist area. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync \t builds or previous release JDK builds will work. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- The 'debug' target and 'import_debug' only works when a debug promoted \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync \t build is available, and they currently are not. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync- The fastest builds have been when the workspace and the BOOTDIR are on \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync \t local disk. \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync--- Examples --- \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug images \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all docs images \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# 'all' target intro
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M')
6831f283dbc5c27bde8a8f8bea179b84a5741697vboxsync# Just in case anyone uses this old name, same as 'build'
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Special debug rules (You may also want to set ALT_OUTPUTDIR)
$(OTHERSUBDIRS-loop)
$(MKDIR) -p $@
all::
@if [ -r $(WARNING_FILE) ]; then \
echo "Creating link for $$sd"; \