Makefile revision 214
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
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#
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#
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#
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#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Makefile for building and packaging all of the JDK and the JRE. See
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# also included files.
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync#
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncBUILDDIR=.
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncinclude $(BUILDDIR)/common/Defs.gmk
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make sure we are clear what the default target is
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncdefault_target: all
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Check target
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsynccheck: variable_check
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Help target
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
9040f019271f91b98e1320c0a8c38a42636e3979vboxsynchelp: intro_help target_help variable_help notes_help examples_help
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# Intro help message
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncintro_help:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) "\
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"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Target help
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsynctarget_help:
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync @$(ECHO) "\
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"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Variable help (only common ones used by this workspace)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_help: variable_help_intro variable_list variable_help_end
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_help_intro:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) "--- Common Variables ---"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_help_end:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) " "
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# One line descriptions for the variables
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncOUTPUTDIR.desc = Output directory
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncBOOTDIR.desc = JDK used to boot the build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncLANGTOOLS_DIST.desc = langtools dist area used to build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncCORBA_DIST.desc = corba dist area
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncJAXP_DIST.desc = jaxp dist area
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncJAXWS_DIST.desc = jaxws dist area
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncJDK_IMPORT_PATH.desc = JDK used to import components of the build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncCOMPILER_PATH.desc = Compiler install directory
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncCACERTS_FILE.desc = Location of certificates file
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDEVTOOLS_PATH.desc = Directory containing zip and unzip
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
6c90795355c6e59ba82e8e5a58e10d686a6d6e65vboxsyncDXSDK_PATH.desc = Root directory of DirectX SDK
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables to print out (description and value)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncVARIABLE_PRINTVAL_LIST += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync OUTPUTDIR \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync PARALLEL_COMPILE_JOBS \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync SLASH_JAVA \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync BOOTDIR \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync LANGTOOLS_DIST \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync JAXWS_DIST \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync CORBA_DIST \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync JAXP_DIST \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync JDK_IMPORT_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync COMPILER_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync CACERTS_FILE \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync DEVTOOLS_PATH
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables that should refer to directories that exist
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncVARIABLE_CHECKDIR_LIST += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync SLASH_JAVA \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync BOOTDIR \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync JDK_IMPORT_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync COMPILER_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync DEVTOOLS_PATH
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Make variables that should refer to files that exist
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncVARIABLE_CHECKFIL_LIST += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync CACERTS_FILE
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Some are windows specific
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncifeq ($(PLATFORM), windows)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncVARIABLE_PRINTVAL_LIST += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync DXSDK_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync MSDEVTOOLS_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync MSVCRT_DLL_PATH
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncVARIABLE_CHECKDIR_LIST += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync DXSDK_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync MSDEVTOOLS_PATH \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync MSVCRT_DLL_PATH
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncendif
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
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
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Complete variable check
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncvariable_list: $(DO_PRINTVAL_LIST) variable_check
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for printing out a variable
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync%.printval:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) " ALT_$* - $($*.desc)"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) " \t $*=$($*)"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for checking to see if a variable with a directory exists
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync%.checkdir:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @if [ ! -d $($*) ] ; then \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync fi
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Pattern rule for checking to see if a variable with a file exists
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync%.checkfil:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @if [ ! -f $($*) ] ; then \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync fi
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Misc notes on help
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncnotes_help:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) "\
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"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncexamples_help:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) "\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync--- Examples --- \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) fastdebug \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug images \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all docs images \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.6.0 \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.7.0 \n\
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# 'all' target intro
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncall::
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M')
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
6831f283dbc5c27bde8a8f8bea179b84a5741697vboxsync# Just in case anyone uses this old name, same as 'build'
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncoptimized: build
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncopenjdk:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) OPENJDK=true all
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Special debug rules (You may also want to set ALT_OUTPUTDIR)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncdebug:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) VARIANT=DBG all
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncfastdebug:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(MAKE) VARIANT=DBG FASTDEBUG=true all
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
#
# Rules to re-import VM and other JDK files
#
import:
$(CD) java/redist; $(MAKE) clean all
import_fastdebug:
$(MAKE) VARIANT=DBG FASTDEBUG=true import
import_product:
$(MAKE) VARIANT=OPT FASTDEBUG=false import
#
# Core.
#
all build:: sanity-all post-sanity-all
SUBDIRS = tools java javax org sun sunw com jpda mkdemo mksample launchers
all build::
$(SUBDIRS-loop)
clean clobber::
$(RM) -r $(OUTPUTDIR)
#
# Docs
#
OTHERSUBDIRS = docs
docs:: sanity-docs post-sanity-docs
$(OTHERSUBDIRS-loop)
#
# Release engineering targets.
#
include $(BUILDDIR)/common/Release.gmk
#
# Cscope targets.
#
include $(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