Makefile revision 328
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# This code is free software; you can redistribute it and/or modify it
60405de4d8688d96dd05157c28db3ade5c9bc234kz# under the terms of the GNU General Public License version 2 only, as
60405de4d8688d96dd05157c28db3ade5c9bc234kz# published by the Free Software Foundation. Oracle designates this
60405de4d8688d96dd05157c28db3ade5c9bc234kz# particular file as subject to the "Classpath" exception as provided
60405de4d8688d96dd05157c28db3ade5c9bc234kz# by Oracle in the LICENSE file that accompanied this code.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# This code is distributed in the hope that it will be useful, but WITHOUT
60405de4d8688d96dd05157c28db3ade5c9bc234kz# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
60405de4d8688d96dd05157c28db3ade5c9bc234kz# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
60405de4d8688d96dd05157c28db3ade5c9bc234kz# version 2 for more details (a copy is included in the LICENSE file that
60405de4d8688d96dd05157c28db3ade5c9bc234kz# accompanied this code).
60405de4d8688d96dd05157c28db3ade5c9bc234kz# You should have received a copy of the GNU General Public License version
60405de4d8688d96dd05157c28db3ade5c9bc234kz# 2 along with this work; if not, write to the Free Software Foundation,
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
60405de4d8688d96dd05157c28db3ade5c9bc234kz# or visit www.oracle.com if you need additional information or have any
60405de4d8688d96dd05157c28db3ade5c9bc234kz# questions.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Everything for a full product build
60405de4d8688d96dd05157c28db3ade5c9bc234kz $(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Generic build of basic repo series
60405de4d8688d96dd05157c28db3ade5c9bc234kz @$(call StopTimer,$(if $(DEBUG_NAME),$(DEBUG_NAME)_build,all_product_build))
60405de4d8688d96dd05157c28db3ade5c9bc234kz# The debug build, fastdebug or debug. Needs special handling.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Note that debug builds do NOT do INSTALL steps, but must be done
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# after the product build and before the INSTALL step of the product build.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# DEBUG_NAME is fastdebug or debug
60405de4d8688d96dd05157c28db3ade5c9bc234kz# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
60405de4d8688d96dd05157c28db3ade5c9bc234kz# The resulting j2sdk-image is used by the install makefiles to create a
60405de4d8688d96dd05157c28db3ade5c9bc234kz# debug install bundle jdk-*-debug-** bundle (tar or zip)
60405de4d8688d96dd05157c28db3ade5c9bc234kz# which will install in the debug or fastdebug subdirectory of the
60405de4d8688d96dd05157c28db3ade5c9bc234kz# normal product install area.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# The install process needs to know what the DEBUG_NAME is, so
60405de4d8688d96dd05157c28db3ade5c9bc234kz# look for INSTALL_DEBUG_NAME in the install rules.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Due to the use of short paths in $(ABS_OUTPUTDIR), this may
60405de4d8688d96dd05157c28db3ade5c9bc234kz# not be the same location.
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Location of fresh bootdir output
66310b5b6be388602e7aa8639a404efd2ddb5687cgFRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Create boot image?
60405de4d8688d96dd05157c28db3ade5c9bc234kz # Create the bootdir to use in the build
60405de4d8688d96dd05157c28db3ade5c9bc234kz # Define variables to be used now for the boot jdk
60405de4d8688d96dd05157c28db3ade5c9bc234kz # Use the supplied ALT_BOOTDIR as the boot
60405de4d8688d96dd05157c28db3ade5c9bc234kz# NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Due to the use of short paths in $(ABS_OUTPUTDIR), this may
60405de4d8688d96dd05157c28db3ade5c9bc234kz# not be the same location.
60405de4d8688d96dd05157c28db3ade5c9bc234kz ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Build final image
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Dev builds
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Quick jdk verification build
60405de4d8688d96dd05157c28db3ade5c9bc234kz $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Quick jdk verification fastdebug build
60405de4d8688d96dd05157c28db3ade5c9bc234kz $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
60405de4d8688d96dd05157c28db3ade5c9bc234kz BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Quick deploy verification fastdebug build
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Product build (skip debug builds)
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Check target
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Help target
60405de4d8688d96dd05157c28db3ade5c9bc234kzhelp: intro_help target_help variable_help notes_help examples_help
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Intro help message
60405de4d8688d96dd05157c28db3ade5c9bc234kzMakefile for the JDK builds (all the JDK). \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Target help
60405de4d8688d96dd05157c28db3ade5c9bc234kz--- Common Targets --- \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kzall -- build the core JDK (default target) \n\
d0538f66491267879b7418b21ad78e3dcc2dcc83cghelp -- Print out help information \n\
d0538f66491267879b7418b21ad78e3dcc2dcc83cgcheck -- Check make variable values for correctness \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kzsanity -- Perform detailed sanity checks on system and settings \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kzfastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kzdebug_build -- build the core JDK in 'debug' mode (-g) \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kzclean -- remove all built and imported files \n\
d0538f66491267879b7418b21ad78e3dcc2dcc83cgclobber -- same as clean \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Variable help (only common ones used by this Makefile)
60405de4d8688d96dd05157c28db3ade5c9bc234kzvariable_help: variable_help_intro variable_list variable_help_end
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# One line descriptions for the variables
60405de4d8688d96dd05157c28db3ade5c9bc234kzPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
60405de4d8688d96dd05157c28db3ade5c9bc234kzSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
60405de4d8688d96dd05157c28db3ade5c9bc234kzJDK_IMPORT_PATH.desc = JDK used to import components of the build
60405de4d8688d96dd05157c28db3ade5c9bc234kzCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Make variables to print out (description and value)
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Make variables that should refer to directories that exist
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Make variables that should refer to files that exist
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Some are windows specific
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# For pattern rules below, so all are treated the same
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Complete variable check
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Pattern rule for printing out a variable
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Pattern rule for checking to see if a variable with a directory exists
60405de4d8688d96dd05157c28db3ade5c9bc234kz @if [ ! -d $($*) ] ; then \
d0538f66491267879b7418b21ad78e3dcc2dcc83cg $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Pattern rule for checking to see if a variable with a file exists
60405de4d8688d96dd05157c28db3ade5c9bc234kz @if [ ! -f $($*) ] ; then \
60405de4d8688d96dd05157c28db3ade5c9bc234kz $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
60405de4d8688d96dd05157c28db3ade5c9bc234kz# Misc notes on help
60405de4d8688d96dd05157c28db3ade5c9bc234kz--- Notes --- \n\
d0538f66491267879b7418b21ad78e3dcc2dcc83cg- All builds use same output directory unless overridden with \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz \t to use the clean target first. \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz \t builds or previous release JDK builds will work. \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz- The fastest builds have been when the sources and the BOOTDIR are on \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz \t local disk. \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz--- Examples --- \n\
60405de4d8688d96dd05157c28db3ade5c9bc234kz################################################################
d0538f66491267879b7418b21ad78e3dcc2dcc83cg# Source bundling
60405de4d8688d96dd05157c28db3ade5c9bc234kz################################################################
60405de4d8688d96dd05157c28db3ade5c9bc234kz################################################################
60405de4d8688d96dd05157c28db3ade5c9bc234kz# rule to test
60405de4d8688d96dd05157c28db3ade5c9bc234kz################################################################
$(CAT) $<; \
@$(RM) $@
$(RM) $@
FRC: