Makefile revision 604
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This code is free software; you can redistribute it and/or modify it
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# under the terms of the GNU General Public License version 2 only, as
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# published by the Free Software Foundation. Sun designates this
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# particular file as subject to the "Classpath" exception as provided
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# by Sun in the LICENSE file that accompanied this code.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This code is distributed in the hope that it will be useful, but WITHOUT
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# version 2 for more details (a copy is included in the LICENSE file that
5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4eTheo Schlossnagle# accompanied this code).
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You should have received a copy of the GNU General Public License version
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# 2 along with this work; if not, write to the Free Software Foundation,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# CA 95054 USA or visit www.sun.com if you need additional information or
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# have any questions.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Makefile for building and packaging all of the JDK and the JRE. See
b9476f453004695da12eaaff383ed9005e7a47c4Joshua M. Clulow# also included files.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweBUILDDIR=.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude $(BUILDDIR)/common/Defs.gmk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Make sure we are clear what the default target is
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedefault_target: all
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Check target
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecheck: variable_check
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Help target
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehelp: intro_help target_help variable_help notes_help examples_help
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Intro help message
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweintro_help:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @$(ECHO) "\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMakefile for the main JDK workspace. \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDefault behavior is to use the BOOTDIR javac to bootstrap the build and \n\
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchiimport in pre-built components like the VM from the JDK_IMPORT_PATH. \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Target help
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetarget_help:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @$(ECHO) "\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov--- Common Targets --- \n\
5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4eTheo Schlossnagleall -- build the core JDK (default target) \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehelp -- Print out help information \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecheck -- Check make variable values for correctness \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowesanity -- Perform detailed sanity checks on system and settings \n\
ff3aea39f71c371be25b08deb9efed41f1c95983Robert Mustacchiopenjdk -- synonym for 'OPENJDK=true all' \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowefastdebug -- build the core JDK in 'fastdebug' mode (-g -O) \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedebug -- build the core JDK in 'debug' mode (-g) \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweclean -- remove all built and imported files \n\
ff3aea39f71c371be25b08deb9efed41f1c95983Robert Mustacchiclobber -- same as clean \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedocs -- run javadoc to generate the JDK documentation \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweimages -- build the jdk and jre image directories \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweimport -- copy in the pre-built components (e.g. VM) \n\
b9476f453004695da12eaaff383ed9005e7a47c4Joshua M. Clulowimport_product -- copy in the product components \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweimport_fastdebug -- copy in the fastdebug components \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweimport_debug -- copy in the debug components \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowesccs_get -- make sure all SCCS files are up-to-date (need SCCS) \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecreate_links -- create softlinks in Solaris 32bit build to 64bit dirs \n\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Variable help (only common ones used by this workspace)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowevariable_help: variable_help_intro variable_list variable_help_end
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowevariable_help_intro:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @$(ECHO) "--- Common Variables ---"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowevariable_help_end:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @$(ECHO) " "
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# One line descriptions for the variables
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweOUTPUTDIR.desc = Output directory
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweBOOTDIR.desc = JDK used to boot the build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLANGTOOLS_DIST.desc = langtools dist area used to build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCORBA_DIST.desc = corba dist area
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJAXP_DIST.desc = jaxp dist area
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJAXWS_DIST.desc = jaxws dist area
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJDK_IMPORT_PATH.desc = JDK used to import components of the build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPILER_PATH.desc = Compiler install directory
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCACERTS_FILE.desc = Location of certificates file
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDEVTOOLS_PATH.desc = Directory containing zip and unzip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDXSDK_PATH.desc = Root directory of DirectX SDK
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Make variables to print out (description and value)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIABLE_PRINTVAL_LIST += \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe OUTPUTDIR \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe PARALLEL_COMPILE_JOBS \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SLASH_JAVA \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BOOTDIR \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe LANGTOOLS_DIST \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe JAXWS_DIST \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CORBA_DIST \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe JAXP_DIST \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe JDK_IMPORT_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe COMPILER_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CACERTS_FILE \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEVTOOLS_PATH
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Make variables that should refer to directories that exist
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIABLE_CHECKDIR_LIST += \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SLASH_JAVA \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe BOOTDIR \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe JDK_IMPORT_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe COMPILER_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DEVTOOLS_PATH
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Make variables that should refer to files that exist
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIABLE_CHECKFIL_LIST += \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CACERTS_FILE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Some are windows specific
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifeq ($(PLATFORM), windows)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIABLE_PRINTVAL_LIST += \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe DXSDK_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe MSDEVTOOLS_PATH \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe MSVCRT_DLL_PATH
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweVARIABLE_CHECKDIR_LIST += \
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi DXSDK_PATH \
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi MSDEVTOOLS_PATH \
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi MSVCRT_DLL_PATH
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchiendif
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi# For pattern rules below, so all are treated the same
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovDO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovDO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Complete variable check
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovvariable_list: $(DO_PRINTVAL_LIST) variable_check
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Pattern rule for printing out a variable
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov%.printval:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov @$(ECHO) " ALT_$* - $($*.desc)"
ff3aea39f71c371be25b08deb9efed41f1c95983Robert Mustacchi @$(ECHO) " \t $*=$($*)"
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Pattern rule for checking to see if a variable with a directory exists
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov%.checkdir:
ff3aea39f71c371be25b08deb9efed41f1c95983Robert Mustacchi @if [ ! -d $($*) ] ; then \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov fi
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Pattern rule for checking to see if a variable with a file exists
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov%.checkfil:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov @if [ ! -f $($*) ] ; then \
b9476f453004695da12eaaff383ed9005e7a47c4Joshua M. Clulow $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
b9476f453004695da12eaaff383ed9005e7a47c4Joshua M. Clulow fi
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Misc notes on help
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovnotes_help:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov @$(ECHO) "\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov--- Notes --- \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- All builds use same output directory unless overridden with \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov \t to use the clean target first. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- LANGTOOLS_DIST must refer to a langtools dist area, used to build. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- CORBA_DIST must refer to a corba dist area. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- JAXP_DIST must refer to a jaxp dist area. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- JAXWS_DIST must refer to a jaxws dist area. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov \t builds or previous release JDK builds will work. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- The 'debug' target and 'import_debug' only works when a debug promoted \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov \t build is available, and they currently are not. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov- The fastest builds have been when the workspace and the BOOTDIR are on \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov \t local disk. \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov"
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovexamples_help:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov @$(ECHO) "\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov--- Examples --- \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) fastdebug \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug images \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all docs images \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.6.0 \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.7.0 \n\
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov"
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# 'all' target intro
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovall::
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M')
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Just in case anyone uses this old name, same as 'build'
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovoptimized: build
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovopenjdk:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) OPENJDK=true all
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Special debug rules (You may also want to set ALT_OUTPUTDIR)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovdebug:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) VARIANT=DBG all
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovfastdebug:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) VARIANT=DBG FASTDEBUG=true all
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Rules to re-import VM and other JDK files
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovimport:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(CD) java/redist; $(MAKE) clean all
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovimport_fastdebug:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) VARIANT=DBG FASTDEBUG=true import
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovimport_product:
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(MAKE) VARIANT=OPT FASTDEBUG=false import
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Core.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovall build:: sanity-all post-sanity-all
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovSUBDIRS = tools java javax org sun sunw com jpda mkdemo mksample launchers
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovall build::
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(SUBDIRS-loop)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovclean clobber::
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(RM) -r $(OUTPUTDIR)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Docs
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweOTHERSUBDIRS = docs
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchidocs:: sanity-docs post-sanity-docs
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi $(OTHERSUBDIRS-loop)
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi#
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi# Release engineering targets.
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchi#
177d5b5f8c0e969013441207a0a705ae66b08cf7Robert Mustacchiinclude $(BUILDDIR)/common/Release.gmk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Cscope targets.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovinclude $(BUILDDIR)/common/Cscope.gmk
#
# Sanity checks.
#
include $(BUILDDIR)/common/Sanity.gmk
$(OUTPUTDIR) $(TEMPDIR):
$(MKDIR) -p $@
# cleanup everything. If the workspace is not being built by the control
# workspace, and if it is a Teamware workspace, then see if there are
# any files which are not under SCCS control.
clean clobber::
ifndef EXTERNALSANITYCONTROL
@if [ -d $(TOPDIR)/Codemgr_wsdata ]; then \
$(ECHO) '\nPerforming workspace scan for remnant files.\n' \
' Any files listed below are not under SCCS control in the workspace\n' \
' and you should review them and possibly remove them manually:' ; \
$(FIND) $(TOPDIR)/make $(TOPDIR)/src -type f | \
$(SED) 's+SCCS/[ps]\.++' | $(SORT) | $(UNIQ) -c | $(NAWK) '$$1<2 {print $$2;}' ; \
$(ECHO) 'End of workspace scan.' ; \
fi
endif
# this should be the last rule in this file:
all::
@if [ -r $(WARNING_FILE) ]; then \
$(CAT) $(WARNING_FILE) ; \
fi
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build finished: $(shell $(DATE) '+%y-%m-%d %H:%M')
#
# Developer rule that links 32 and 64 bit builds on Solaris by creating
# softlinks in the 32bit outputdir to the 64bit outputdir.
#
ifeq ($(PLATFORM), solaris)
ifeq ($(ARCH_FAMILY), sparc)
ARCH32 = sparc
ARCH64 = sparcv9
else
ARCH32 = i586
ARCH64 = amd64
endif
OUTPUTDIR32 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH32)
OUTPUTDIR64 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH64)
endif
create_links:
ifeq ($(PLATFORM), solaris)
@if [ -d $(OUTPUTDIR32) -a -d $(OUTPUTDIR64) ] ; then \
dirlist=`($(CD) $(OUTPUTDIR64); $(FIND) . -name $(ARCH64))`; \
for sd in $$dirlist ; do \
pdir=`$(DIRNAME) $$sd`; \
if [ -d $(OUTPUTDIR32)/$$pdir ] ; then \
echo "Creating link for $$sd"; \
(cd $(OUTPUTDIR32)/$$pdir; $(RM) $(ARCH64); \
$(LN) -s $(OUTPUTDIR64)/$$sd ); \
fi; \
done; \
else \
$(ECHO) "Build both 32 and 64 bit versions first"; \
fi
else
$(ECHO) "Rule $@ does not apply on $(PLATFORM)-$(ARCH)"
endif
#
# Binary Plug rules and macros
#
include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
#
# Get top level sccs_get rule
#
include $(BUILDDIR)/common/Rules-SCCS.gmk
# JPRT rules
include jprt.gmk
#
# Phonies to avoid accidents.
#
.PHONY: all build clean clobber optimized debug fastdebug create_links \
import import_product import_fastdebug import_debug