Makefile revision 5:d6b08bdb9a54
152419Sjulian# 252419Sjulian# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. 3139823Simp# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4139823Simp# 5139823Simp# This code is free software; you can redistribute it and/or modify it 652419Sjulian# under the terms of the GNU General Public License version 2 only, as 752419Sjulian# published by the Free Software Foundation. Sun designates this 870784Sjulian# particular file as subject to the "Classpath" exception as provided 952419Sjulian# by Sun in the LICENSE file that accompanied this code. 1052419Sjulian# 1152419Sjulian# This code is distributed in the hope that it will be useful, but WITHOUT 1252419Sjulian# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1352419Sjulian# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1452419Sjulian# version 2 for more details (a copy is included in the LICENSE file that 1552419Sjulian# accompanied this code). 1652419Sjulian# 1752419Sjulian# You should have received a copy of the GNU General Public License version 1852419Sjulian# 2 along with this work; if not, write to the Free Software Foundation, 1970784Sjulian# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2052419Sjulian# 2152419Sjulian# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 2252419Sjulian# CA 95054 USA or visit www.sun.com if you need additional information or 2352419Sjulian# have any questions. 2452419Sjulian# 2552419Sjulian 2652419SjulianBUILD_PARENT_DIRECTORY=. 2752419Sjulian 2852419Sjulianifndef TOPDIR 2952419Sjulian TOPDIR:=$(shell \ 3052419Sjulian if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \ 3152419Sjulian echo "."; \ 3252419Sjulian else \ 3352419Sjulian echo "../.."; \ 3452419Sjulian fi) 3552419Sjulianendif 3652419Sjulian 3752419Sjulianifndef CONTROL_TOPDIR 3867506Sjulian CONTROL_TOPDIR=$(TOPDIR)/control 3952419Sjulian CONTROL_TOPDIR:=$(shell \ 4052419Sjulian if [ -r $(TOPDIR)/control/make/Makefile ]; then \ 4152752Sjulian echo "$(TOPDIR)/control"; \ 4252419Sjulian else \ 4352419Sjulian echo "$(TOPDIR)"; \ 4452419Sjulian fi) 4552419Sjulianendif 4652419Sjulian 4752419Sjulian# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true) 4852419SjulianOPENJDK_SOURCETREE=$(TOPDIR)/openjdk 4952419SjulianOPENJDK_BUILDDIR:=$(shell \ 5052419Sjulian if [ -r $(OPENJDK_SOURCETREE)/control/make/Makefile ]; then \ 5152419Sjulian echo "$(OPENJDK_SOURCETREE)/control/make"; \ 5252419Sjulian elif [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \ 5352419Sjulian echo "$(OPENJDK_SOURCETREE)"; \ 54231587Sglebius else \ 5552419Sjulian echo "."; \ 56132705Sglebius fi) 5795759Stanimura 5852419Sjulianifndef JDK_TOPDIR 5952419Sjulian JDK_TOPDIR=$(TOPDIR)/jdk 60132013Srwatsonendif 61164033Srwatsonifndef JDK_MAKE_SHARED_DIR 6252419Sjulian JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared 6395759Stanimuraendif 6452419Sjulian 6552419Sjulianinclude $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk 66159590Sjhb 6752419Sjulianinclude ./make/Defs-internal.gmk 68195837Srwatson 69195837Srwatsonall:: 70195837Srwatson @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'` 7152419Sjulian $(MKDIR) -p $(OUTPUTDIR) 7252419Sjulian 7352919Sjulian# Rules for sanity checks 7452419Sjulianinclude ./make/sanity-rules.gmk 7552419Sjulian 7670870Sjuliandev : dev-build 7770870Sjulian 7870870Sjuliandev-build: 7970870Sjulian $(MAKE) DEV_ONLY=true all 8070870Sjuliandev-sanity: 8170870Sjulian $(MAKE) DEV_ONLY=true sanity 8270870Sjuliandev-clobber: 8370870Sjulian $(MAKE) DEV_ONLY=true clobber 8452419Sjulian 8552419Sjulian# Rules for various components 8652419Sjulianinclude ./make/hotspot-rules.gmk 8752419Sjulianinclude ./make/langtools-rules.gmk 8852419Sjulianinclude ./make/corba-rules.gmk 8952419Sjulianinclude ./make/jaxp-rules.gmk 9052419Sjulianinclude ./make/jaxws-rules.gmk 9152419Sjulianinclude ./make/jdk-rules.gmk 9252419Sjulianinclude ./make/install-rules.gmk 9352419Sjulianinclude ./make/sponsors-rules.gmk 9452419Sjulianinclude ./make/deploy-rules.gmk 9552419Sjulian 9652419Sjulianall:: setup build 9752419Sjulian 9852419Sjuliansetup: openjdk_check 9952419Sjulian $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image 10052419Sjulian 10152419Sjulian# Check on whether we really can build the openjdk, need source etc. 10252419Sjulianopenjdk_check: FRC 10352419Sjulianifneq ($(SKIP_OPENJDK_BUILD), true) 10452419Sjulian @$(ECHO) " " 10552419Sjulian @$(ECHO) "=================================================" 10652419Sjulian @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \ 10752419Sjulian $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \ 10852419Sjulian exit 1; \ 10952419Sjulian else \ 11052419Sjulian $(ECHO) "OpenJDK will be built after JDK is built"; \ 11152752Sjulian $(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \ 11252752Sjulian fi 11370700Sjulian @$(ECHO) "=================================================" 11452752Sjulian @$(ECHO) " " 11572053Sjulianendif 116231587Sglebius 11752752Sjulianbuild:: sanity 11852885Sjulian 11952419Sjulianclobber:: 12052419Sjulian 12152419Sjulianifeq ($(BUILD_LANGTOOLS), true) 12252419Sjulian build:: langtools 12352419Sjulian clobber:: langtools-clobber 124151975Sglebiusendif 125151975Sglebius 12652419Sjulianifeq ($(BUILD_CORBA), true) 12752419Sjulian build:: corba 12852419Sjulian clobber:: corba-clobber 12952419Sjulianendif 130147774Sglebius 13152419Sjulianifeq ($(BUILD_JAXP), true) 13252419Sjulian build:: jaxp 13352419Sjulian clobber:: jaxp-clobber 134129823Sjulianendif 135129823Sjulian 136129823Sjulianifeq ($(BUILD_JAXWS), true) 137129823Sjulian build:: jaxws 138129823Sjulian clobber:: jaxws-clobber 139129823Sjulianendif 140129823Sjulian 141129823Sjulianifeq ($(BUILD_HOTSPOT), true) 142231587Sglebius build:: $(HOTSPOT) 143129823Sjulian clobber:: hotspot-clobber 144129823Sjulianendif 14552419Sjulian 146138238Smlaierifeq ($(BUILD_JDK), true) 14752419Sjulian build:: $(JDK_JAVA_EXE) 14852419Sjulian clobber:: jdk-clobber 14964512Sarchieendif 150217320Smdf 151124871Sruifeq ($(BUILD_DEPLOY), true) 15252419Sjulian build:: $(DEPLOY) 153217320Smdf clobber:: deploy-clobber 154125116Sruendif 15552419Sjulian 156205082Sglebius# 157205082Sglebius# Generic debug build, fastdebug or debug. Needs special handling. 158205082Sglebius# Note that debug builds do NOT do INSTALL steps, but must be done 159205082Sglebius# after the product build and before the INSTALL step of the product build. 160205082Sglebius# 16153526Sjulian# DEBUG_NAME is fastdebug or debug 16252419Sjulian# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix 163131933Smarcel# The resulting j2sdk-image is used by the install makefiles to create a 16452419Sjulian# debug install bundle jdk-*-debug-** bundle (tar or zip) 16552419Sjulian# which will install in the debug or fastdebug subdirectory of the 16652419Sjulian# normal product install area. 16752419Sjulian# The install process needs to know what the DEBUG_NAME is, so 16852419Sjulian# look for INSTALL_DEBUG_NAME in the install rules. 16952419Sjulian# 17052419Sjulian 17152419SjulianCOMMON_DEBUG_FLAGS= \ 17252419Sjulian DEBUG_NAME=$(DEBUG_NAME) \ 17383366Sjulian ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ 17452419Sjulian NO_DOCS=true 17552419Sjulian 176164033Srwatsonproduct_build: setup 17752419Sjulian @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` 178164033Srwatson $(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all 179164033Srwatson @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` 180164033Srwatson 18152419Sjuliangeneric_debug_build: 18252419Sjulian @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` 18352419Sjulian $(MAKE) $(COMMON_DEBUG_FLAGS) setup build 18452419Sjulian @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` 18552419Sjulian 186157370Srwatsondebug_build: setup 18752419Sjulian $(MAKE) DEBUG_NAME=debug generic_debug_build 18852419Sjulian 18952419Sjulianfastdebug_build: setup 19052419Sjulian $(MAKE) DEBUG_NAME=fastdebug generic_debug_build 191157370Srwatson 192151975Sglebiusifeq ($(SKIP_FASTDEBUG_BUILD), false) 19352419Sjulian all:: fastdebug_build 19452419Sjulianendif 19552419Sjulian 19652419Sjulianifeq ($(SKIP_DEBUG_BUILD), false) 19783366Sjulian all:: debug_build 19852419Sjulianendif 19952419Sjulian 200147774Sglebiusifeq ($(BUILD_JDK), true) 20152419Sjulian ifeq ($(BUNDLE_RULES_AVAILABLE), true) 20270700Sjulian all:: openjdk-binary-plugs-bundles 20352419Sjulian endif 204146317Sglebiusendif 20570700Sjulian 20652419Sjulianifeq ($(BUILD_INSTALL), true) 207172806Smav all :: $(INSTALL) 20852419Sjulian clobber:: install-clobber 20952419Sjulianendif 21052419Sjulian 21152419Sjulianifeq ($(BUILD_SPONSORS), true) 21252419Sjulian all :: $(SPONSORS) 21352419Sjulian clobber:: sponsors-clobber 214163463Sglebiusendif 21552419Sjulian 21652419Sjulianifneq ($(SKIP_COMPARE_IMAGES), true) 21752419Sjulian all :: compare-image 21852419Sjulianendif 21952419Sjulian 220163463Sglebiusifneq ($(SKIP_OPENJDK_BUILD), true) 221163463Sglebius all :: openjdk_build 222163463Sglebiusendif 223163463Sglebius 22452419Sjulian# If we have bundle rules, we have a chance here to do a complete cycle 225163463Sglebius# build, of production and open build. 22652419Sjulian# FIXUP: We should create the openjdk source bundle and build that? 22752419Sjulian# But how do we reliable create or get at a formal openjdk source tree? 22852419Sjulian# The one we have needs to be trimmed of built bits and closed dirs. 229163463Sglebius# The repositories might not be available. 230163463Sglebius# The openjdk source bundle is probably not available. 231163463Sglebius 232163463Sglebiusifneq ($(SKIP_OPENJDK_BUILD), true) 23352419Sjulian ifeq ($(BUILD_JDK), true) 23452419Sjulian ifeq ($(BUNDLE_RULES_AVAILABLE), true) 23552419Sjulian 236163463SglebiusOPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) 237163463SglebiusOPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output 238163463SglebiusOPENJDK_BUILD_NAME \ 239163463Sglebius = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) 240163463SglebiusOPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip 24170700SjulianBUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image 24252419Sjulianifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) 243141308Sglebius OPENJDK_BOOTDIR=$(BOOTDIR) 244163463Sglebius OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH) 245141308Sglebiuselse 246141308Sglebius OPENJDK_BOOTDIR=$(BUILT_IMAGE) 247141308Sglebius OPENJDK_IMPORTJDK=$(BUILT_IMAGE) 248141308Sglebiusendif 249132705Sglebius 250132705Sglebiusopenjdk_build: 251132705Sglebius @$(ECHO) " " 252132705Sglebius @$(ECHO) "=================================================" 253132705Sglebius @$(ECHO) "Starting openjdk build" 254132705Sglebius @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)" 255132939Sglebius @$(ECHO) "=================================================" 256132939Sglebius @$(ECHO) " " 257132705Sglebius $(RM) -r $(OPENJDK_OUTPUTDIR) 258132705Sglebius $(MKDIR) -p $(OPENJDK_OUTPUTDIR) 259185183Smav ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ 260132705Sglebius OPENJDK=true \ 261159590Sjhb ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ 262132705Sglebius ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ 263146296Sglebius ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ 264146296Sglebius ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \ 265146296Sglebius ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \ 266159590Sjhb product_build ) 267132705Sglebius $(RM) $(OPENJDK_BUILD_BINARY_ZIP) 268163463Sglebius ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \ 269132705Sglebius $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) 270132705Sglebius $(RM) -r $(OPENJDK_OUTPUTDIR) 271132705Sglebius @$(ECHO) " " 272146296Sglebius @$(ECHO) "=================================================" 273185183Smav @$(ECHO) "Finished openjdk build" 274163463Sglebius @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" 275159590Sjhb @$(ECHO) "=================================================" 276159590Sjhb @$(ECHO) " " 277132705Sglebius 278132705Sglebius endif 279132705Sglebius endif 280132705Sglebiusendif 281132705Sglebius 282132705Sglebiusclobber:: 283163463Sglebius $(RM) -r $(OUTPUTDIR)/* 284163463Sglebius $(RM) -r $(OUTPUTDIR)-debug/* 285163463Sglebius $(RM) -r $(OUTPUTDIR)-fastdebug/* 286146296Sglebius -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE)) 287146317Sglebius 288146317Sglebiusclean: clobber 289146317Sglebius 290146317Sglebiusall:: 291146296Sglebius @$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` 292146317Sglebius 293146317Sglebius# 294146317Sglebius# Quick jdk verification build 295146317Sglebius# 296146317Sglebiusjdk_only: 297146317Sglebius $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all 298146317Sglebius 299146317Sglebius 300146317Sglebius# 30170784Sjulian# Quick jdk verification fastdebug build 302146317Sglebius# 303147774Sglebiusjdk_fastdebug_only: 304147774Sglebius $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \ 305147774Sglebius BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build 306147774Sglebius 307147774Sglebius# 308147774Sglebius# Quick deploy verification fastdebug build 309147774Sglebius# 310147774Sglebiusdeploy_fastdebug_only: 311172806Smav $(MAKE) \ 312172806Smav DEBUG_NAME=fastdebug \ 313172806Smav BUILD_HOTSPOT=false \ 314172806Smav BUILD_JDK=false \ 315147774Sglebius BUILD_LANGTOOLS=false \ 316146296Sglebius BUILD_CORBA=false \ 317172806Smav BUILD_JAXP=false \ 318147774Sglebius BUILD_JAXWS=false \ 319172806Smav BUILD_INSTALL=false \ 320172806Smav BUILD_SPONSORS=false \ 321172806Smav generic_debug_build 322172806Smav 323172806Smav# 324172806Smav# Product build (skip debug builds) 325172806Smav# 326147774Sglebiusproduct_only: 32752419Sjulian $(MAKE) SKIP_FASTDEBUG_BUILD=true all 32852419Sjulian 329163463Sglebius# 33052419Sjulian# Check target 33152419Sjulian# 33252419Sjulian 33352419Sjuliancheck: variable_check 33452419Sjulian 33552419Sjulian# 33652419Sjulian# Help target 33752419Sjulian# 33883366Sjulianhelp: intro_help target_help variable_help notes_help examples_help 33952419Sjulian 34052419Sjulian# Intro help message 34152419Sjulianintro_help: 34252419Sjulian @$(ECHO) "\ 34352419SjulianMakefile for the JDK builds (all the JDK). \n\ 34452419Sjulian" 34552419Sjulian 34652419Sjulian# Target help 34752419Sjuliantarget_help: 34883366Sjulian @$(ECHO) "\ 34952419Sjulian--- Common Targets --- \n\ 35070700Sjulianall -- build the core JDK (default target) \n\ 35170784Sjulianhelp -- Print out help information \n\ 35270700Sjuliancheck -- Check make variable values for correctness \n\ 35370700Sjuliansanity -- Perform detailed sanity checks on system and settings \n\ 354163463Sglebiusfastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\ 35570700Sjuliandebug_build -- build the core JDK in 'debug' mode (-g) \n\ 35652419Sjulianclean -- remove all built and imported files \n\ 35752419Sjulianclobber -- same as clean \n\ 35852419Sjulian" 35952419Sjulian 36052419Sjulian# Variable help (only common ones used by this Makefile) 36152419Sjulianvariable_help: variable_help_intro variable_list variable_help_end 36252419Sjulianvariable_help_intro: 36383366Sjulian @$(ECHO) "--- Common Variables ---" 36452419Sjulianvariable_help_end: 36552419Sjulian @$(ECHO) " " 36652419Sjulian 36752419Sjulian# One line descriptions for the variables 36852419SjulianOUTPUTDIR.desc = Output directory 36952419SjulianPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count 37052419SjulianSLASH_JAVA.desc = Root of all build tools, e.g. /java or J: 37152419SjulianBOOTDIR.desc = JDK used to boot the build 372157370SrwatsonJDK_IMPORT_PATH.desc = JDK used to import components of the build 37352419SjulianCOMPILER_PATH.desc = Compiler install directory 37452419SjulianCACERTS_FILE.desc = Location of certificates file 37552419SjulianDEVTOOLS_PATH.desc = Directory containing zip and gnumake 37652419SjulianCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files 377157558SrwatsonDXSDK_PATH.desc = Root directory of DirectX SDK 378151975SglebiusMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe) 37952419SjulianMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll 38052419Sjulian 38152419Sjulian# Make variables to print out (description and value) 38252419SjulianVARIABLE_PRINTVAL_LIST += \ 38383366Sjulian OUTPUTDIR \ 38452419Sjulian PARALLEL_COMPILE_JOBS \ 38552419Sjulian SLASH_JAVA \ 38652419Sjulian BOOTDIR \ 387163463Sglebius JDK_IMPORT_PATH \ 38853498Sjulian COMPILER_PATH \ 389125028Sharti CACERTS_FILE \ 39052419Sjulian DEVTOOLS_PATH 39152419Sjulian 39252419Sjulian# Make variables that should refer to directories that exist 39352419SjulianVARIABLE_CHECKDIR_LIST += \ 39452419Sjulian SLASH_JAVA \ 39552419Sjulian BOOTDIR \ 39652419Sjulian JDK_IMPORT_PATH \ 39752419Sjulian COMPILER_PATH \ 39852419Sjulian DEVTOOLS_PATH 399146718Sbz 400146718Sbz# Make variables that should refer to files that exist 401146718SbzVARIABLE_CHECKFIL_LIST += \ 402146718Sbz CACERTS_FILE 403146718Sbz 404146718Sbz# Some are windows specific 40553498Sjulianifeq ($(PLATFORM), windows) 40653498Sjulian 40753498SjulianVARIABLE_PRINTVAL_LIST += \ 40853498Sjulian DXSDK_PATH \ 409146718Sbz MSDEVTOOLS_PATH \ 41070784Sjulian MSVCRT_DLL_PATH 41153498Sjulian 41253498SjulianVARIABLE_CHECKDIR_LIST += \ 41353498Sjulian DXSDK_PATH \ 41453498Sjulian MSDEVTOOLS_PATH \ 415163463Sglebius MSVCRT_DLL_PATH 41653498Sjulian 41753498Sjulianendif 41870784Sjulian 41953498Sjulian# For pattern rules below, so all are treated the same 420125028ShartiDO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) 42153498SjulianDO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) 42253498SjulianDO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) 42353498Sjulian 42452419Sjulian# Complete variable check 42553498Sjulianvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) 42653498Sjulianvariable_list: $(DO_PRINTVAL_LIST) variable_check 42753498Sjulian 42853498Sjulian# Pattern rule for printing out a variable 42953498Sjulian%.printval: 43053498Sjulian @$(ECHO) " ALT_$* - $($*.desc)" 43152419Sjulian @$(ECHO) " \t $*=$($*)" 43253498Sjulian 433163463Sglebius# Pattern rule for checking to see if a variable with a directory exists 43472053Sjulian%.checkdir: 43553498Sjulian @if [ ! -d $($*) ] ; then \ 436163463Sglebius $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ 43772053Sjulian fi 43852419Sjulian 43952419Sjulian# Pattern rule for checking to see if a variable with a file exists 440163463Sglebius%.checkfil: 441163463Sglebius @if [ ! -f $($*) ] ; then \ 44252419Sjulian $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ 44352419Sjulian fi 44452419Sjulian 44552419Sjulian# Misc notes on help 44652419Sjuliannotes_help: 44752419Sjulian @$(ECHO) "\ 44852419Sjulian--- Notes --- \n\ 44952419Sjulian- All builds use same output directory unless overridden with \n\ 45052419Sjulian \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ 45152419Sjulian \t to use the clean target first. \n\ 45283366Sjulian- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ 45352419Sjulian \t builds or previous release JDK builds will work. \n\ 45452419Sjulian- The fastest builds have been when the sources and the BOOTDIR are on \n\ 45552419Sjulian \t local disk. \n\ 45652419Sjulian" 45752419Sjulian 45852419Sjulianexamples_help: 45952419Sjulian @$(ECHO) "\ 46052419Sjulian--- Examples --- \n\ 46152419Sjulian $(MAKE) fastdebug_build \n\ 46252419Sjulian $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ 46352419Sjulian $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\ 46452419Sjulian $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ 465169462Srwatson $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\ 46652419Sjulian $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\ 46753098Sbrian" 46853098Sbrian 469151975Sglebius################################################################ 470151975Sglebius# Source and binary plug bundling 47152419Sjulian################################################################ 47253098Sbrianifeq ($(BUNDLE_RULES_AVAILABLE), true) 47353098Sbrian include $(BUNDLE_RULES) 47453098Sbrianendif 47553098Sbrian 476151975Sglebius################################################################ 477151975Sglebius# Cycle build. Build the jdk, use it to build the jdk again. 47852419Sjulian################################################################ 47953098Sbrian 480151975SglebiusABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk 481151975Sglebius 482151975Sglebiusboot_cycle: 483151975Sglebius $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build 48453098Sbrian $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build 485151975Sglebius 486151975Sglebius################################################################ 48753098Sbrian# JPRT rule to build 488151975Sglebius################################################################ 48953098Sbrian 490151975Sglebiusinclude ./make/jprt.gmk 491151975Sglebius 49253098Sbrian################################################################ 493151975Sglebius# PHONY 494151975Sglebius################################################################ 495151975Sglebius 496151975Sglebius.PHONY: all build what clobber insane \ 497151975Sglebius fastdebug_build debug_build product_build setup \ 498151975Sglebius dev dev-build dev-sanity dev-clobber 499151975Sglebius 500151975Sglebius# FIXUP: Old j2se targets 501151975Sglebiusj2se_fastdebug_only: jdk_fastdebug_only 502151975Sglebiusj2se_only: jdk_only 50352419Sjulian 50452419Sjulian# Force target 50552419SjulianFRC: 50652419Sjulian 50752419Sjulian