Makefile revision 8
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# This code is free software; you can redistribute it and/or modify it
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# under the terms of the GNU General Public License version 2 only, as
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# published by the Free Software Foundation. Sun designates this
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# particular file as subject to the "Classpath" exception as provided
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# by Sun in the LICENSE file that accompanied this code.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# This code is distributed in the hope that it will be useful, but WITHOUT
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# version 2 for more details (a copy is included in the LICENSE file that
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# accompanied this code).
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# You should have received a copy of the GNU General Public License version
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# 2 along with this work; if not, write to the Free Software Foundation,
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews#
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# CA 95054 USA or visit www.sun.com if you need additional information or
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# have any questions.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsBUILD_PARENT_DIRECTORY=.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsifndef TOPDIR
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington TOPDIR:=.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifndef CONTROL_TOPDIR
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews CONTROL_TOPDIR=$(TOPDIR)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
4038ab55037184d76153afd3c469aa8c85adf85dMark AndrewsOPENJDK_SOURCETREE=$(TOPDIR)/openjdk
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsOPENJDK_BUILDDIR:=$(shell \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews echo "$(OPENJDK_SOURCETREE)"; \
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews else \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews echo "."; \
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews fi)
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsifndef JDK_TOPDIR
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson JDK_TOPDIR=$(TOPDIR)/jdk
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsifndef JDK_MAKE_SHARED_DIR
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninclude ./make/Defs-internal.gmk
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsall::
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MKDIR) -p $(OUTPUTDIR)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Rules for sanity checks
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinclude ./make/sanity-rules.gmk
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsdev : dev-build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsdev-build:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) DEV_ONLY=true all
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsdev-sanity:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) DEV_ONLY=true sanity
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrewsdev-clobber:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) DEV_ONLY=true clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Rules for various components
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinclude ./make/hotspot-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/langtools-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/corba-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/jaxp-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/jaxws-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/jdk-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/install-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/sponsors-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ./make/deploy-rules.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonall:: setup build
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonsetup: openjdk_check
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Check on whether we really can build the openjdk, need source etc.
c25080dc50542213058c240226c9f342186e6285Mark Andrewsopenjdk_check: FRC
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifneq ($(SKIP_OPENJDK_BUILD), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @$(ECHO) " "
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews @$(ECHO) "================================================="
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
c25080dc50542213058c240226c9f342186e6285Mark Andrews exit 1; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews else \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(ECHO) "OpenJDK will be built after JDK is built"; \
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews $(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews fi
c25080dc50542213058c240226c9f342186e6285Mark Andrews @$(ECHO) "================================================="
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews @$(ECHO) " "
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsbuild:: sanity
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsclobber::
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_LANGTOOLS), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews build:: langtools
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews clobber:: langtools-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsifeq ($(BUILD_CORBA), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews build:: corba
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews clobber:: corba-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_JAXP), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews build:: jaxp
c25080dc50542213058c240226c9f342186e6285Mark Andrews clobber:: jaxp-clobber
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_JAXWS), true)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews build:: jaxws
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews clobber:: jaxws-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_HOTSPOT), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews build:: $(HOTSPOT)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews clobber:: hotspot-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_JDK), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews build:: $(JDK_JAVA_EXE)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews clobber:: jdk-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_DEPLOY), true)
5752b9e296f14034f103149f18188770c2cc5239Mark Andrews build:: $(DEPLOY)
c25080dc50542213058c240226c9f342186e6285Mark Andrews clobber:: deploy-clobber
5752b9e296f14034f103149f18188770c2cc5239Mark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Generic debug build, fastdebug or debug. Needs special handling.
ca12f7f4cf72e2368ee946f3eb4915ab73576cdcMark Andrews# Note that debug builds do NOT do INSTALL steps, but must be done
c25080dc50542213058c240226c9f342186e6285Mark Andrews# after the product build and before the INSTALL step of the product build.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# DEBUG_NAME is fastdebug or debug
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The resulting j2sdk-image is used by the install makefiles to create a
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# debug install bundle jdk-*-debug-** bundle (tar or zip)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# which will install in the debug or fastdebug subdirectory of the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# normal product install area.
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# The install process needs to know what the DEBUG_NAME is, so
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# look for INSTALL_DEBUG_NAME in the install rules.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMMON_DEBUG_FLAGS= \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews DEBUG_NAME=$(DEBUG_NAME) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
ca12f7f4cf72e2368ee946f3eb4915ab73576cdcMark Andrews NO_DOCS=true
7c40ffd67bd1e73907f83a79a6ff8c635f4a4a74Mark Andrews
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrewsproduct_build: setup
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews
fd42a013f17611b34cd49cc0abee0a6b0d251a6bMark Andrewsgeneric_debug_build:
09344332cf7840e7e219215128fd52ea4c3d6942Mark Andrews @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(MAKE) $(COMMON_DEBUG_FLAGS) setup build
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtondebug_build: setup
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(MAKE) DEBUG_NAME=debug generic_debug_build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsfastdebug_build: setup
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(SKIP_FASTDEBUG_BUILD), false)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews all:: fastdebug_build
5752b9e296f14034f103149f18188770c2cc5239Mark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(SKIP_DEBUG_BUILD), false)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews all:: debug_build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifeq ($(BUILD_JDK), true)
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafsson ifeq ($(BUNDLE_RULES_AVAILABLE), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews all:: openjdk-binary-plugs-bundles
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews endif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonifeq ($(BUILD_INSTALL), true)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson all :: $(INSTALL)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson clobber:: install-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonifeq ($(BUILD_SPONSORS), true)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews all :: $(SPONSORS)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington clobber:: sponsors-clobber
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonendif
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrewsifneq ($(SKIP_COMPARE_IMAGES), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews all :: compare-image
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsifneq ($(SKIP_OPENJDK_BUILD), true)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews all :: openjdk_build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# If we have bundle rules, we have a chance here to do a complete cycle
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# build, of production and open build.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# FIXUP: We should create the openjdk source bundle and build that?
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# But how do we reliable create or get at a formal openjdk source tree?
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The one we have needs to be trimmed of built bits and closed dirs.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The repositories might not be available.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The openjdk source bundle is probably not available.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonifneq ($(SKIP_OPENJDK_BUILD), true)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ifeq ($(BUILD_JDK), true)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ifeq ($(BUNDLE_RULES_AVAILABLE), true)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonOPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonOPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonOPENJDK_BUILD_NAME \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonOPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonBUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENJDK_BOOTDIR=$(BOOTDIR)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonelse
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENJDK_BOOTDIR=$(BUILT_IMAGE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonendif
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonopenjdk_build:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " "
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "================================================="
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "Starting openjdk build"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "================================================="
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " "
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) -r $(OPENJDK_OUTPUTDIR)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENJDK=true \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington product_build )
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) $(OPENJDK_BUILD_BINARY_ZIP)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) -r $(OPENJDK_OUTPUTDIR)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " "
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "================================================="
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "Finished openjdk build"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "================================================="
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews @$(ECHO) " "
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington endif
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington endif
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellingtonendif
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellingtonclobber::
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington $(RM) -r $(OUTPUTDIR)/*
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) -r $(OUTPUTDIR)-debug/*
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) -r $(OUTPUTDIR)-fastdebug/*
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellingtonclean: clobber
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonall::
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'`
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Quick jdk verification build
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsjdk_only:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Quick jdk verification fastdebug build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrewsjdk_fastdebug_only:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Quick deploy verification fastdebug build
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsdeploy_fastdebug_only:
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews $(MAKE) \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews DEBUG_NAME=fastdebug \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_HOTSPOT=false \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews BUILD_JDK=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_LANGTOOLS=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_CORBA=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_JAXP=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_JAXWS=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_INSTALL=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BUILD_SPONSORS=false \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington generic_debug_build
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Product build (skip debug builds)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonproduct_only:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MAKE) SKIP_FASTDEBUG_BUILD=true all
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Check target
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoncheck: variable_check
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Help target
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewshelp: intro_help target_help variable_help notes_help examples_help
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Intro help message
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsintro_help:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @$(ECHO) "\
eaccf5e805405de257b5a4840256c580fefe00e3Mark AndrewsMakefile for the JDK builds (all the JDK). \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Target help
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtontarget_help:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington--- Common Targets --- \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonall -- build the core JDK (default target) \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonhelp -- Print out help information \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoncheck -- Check make variable values for correctness \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonsanity -- Perform detailed sanity checks on system and settings \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonfastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtondebug_build -- build the core JDK in 'debug' mode (-g) \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonclean -- remove all built and imported files \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonclobber -- same as clean \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Variable help (only common ones used by this Makefile)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonvariable_help: variable_help_intro variable_list variable_help_end
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonvariable_help_intro:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) "--- Common Variables ---"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonvariable_help_end:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " "
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# One line descriptions for the variables
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonOUTPUTDIR.desc = Output directory
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsBOOTDIR.desc = JDK used to boot the build
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonJDK_IMPORT_PATH.desc = JDK used to import components of the build
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPILER_PATH.desc = Compiler install directory
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCACERTS_FILE.desc = Location of certificates file
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonDEVTOOLS_PATH.desc = Directory containing zip and gnumake
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonDXSDK_PATH.desc = Root directory of DirectX SDK
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Make variables to print out (description and value)
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsVARIABLE_PRINTVAL_LIST += \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews OUTPUTDIR \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington PARALLEL_COMPILE_JOBS \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews SLASH_JAVA \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews BOOTDIR \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews JDK_IMPORT_PATH \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews COMPILER_PATH \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews CACERTS_FILE \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews DEVTOOLS_PATH
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Make variables that should refer to directories that exist
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsVARIABLE_CHECKDIR_LIST += \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews SLASH_JAVA \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington BOOTDIR \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews JDK_IMPORT_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington COMPILER_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington DEVTOOLS_PATH
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Make variables that should refer to files that exist
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonVARIABLE_CHECKFIL_LIST += \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington CACERTS_FILE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Some are windows specific
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonifeq ($(PLATFORM), windows)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonVARIABLE_PRINTVAL_LIST += \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington DXSDK_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington MSDEVTOOLS_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington MSVCRT_DLL_PATH
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonVARIABLE_CHECKDIR_LIST += \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington DXSDK_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington MSDEVTOOLS_PATH \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington MSVCRT_DLL_PATH
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonendif
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# For pattern rules below, so all are treated the same
eaccf5e805405de257b5a4840256c580fefe00e3Mark AndrewsDO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonDO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsDO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Complete variable check
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrewsvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsvariable_list: $(DO_PRINTVAL_LIST) variable_check
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews# Pattern rule for printing out a variable
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews%.printval:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(ECHO) " ALT_$* - $($*.desc)"
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews @$(ECHO) " \t $*=$($*)"
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews# Pattern rule for checking to see if a variable with a directory exists
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington%.checkdir:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @if [ ! -d $($*) ] ; then \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews fi
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Pattern rule for checking to see if a variable with a file exists
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington%.checkfil:
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews @if [ ! -f $($*) ] ; then \
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington fi
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Misc notes on help
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsnotes_help:
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews @$(ECHO) "\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews--- Notes --- \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews- All builds use same output directory unless overridden with \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews \t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews \t to use the clean target first. \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews \t builds or previous release JDK builds will work. \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews- The fastest builds have been when the sources and the BOOTDIR are on \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews \t local disk. \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews"
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsexamples_help:
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews @$(ECHO) "\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews--- Examples --- \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) fastdebug_build \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews $(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews"
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews################################################################
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Source and binary plug bundling
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews################################################################
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsifeq ($(BUNDLE_RULES_AVAILABLE), true)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington include $(BUNDLE_RULES)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsendif
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews################################################################
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Cycle build. Build the jdk, use it to build the jdk again.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews################################################################
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark AndrewsABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrewsboot_cycle:
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews $(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews################################################################
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews# JPRT rule to build
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews################################################################
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrewsinclude ./make/jprt.gmk
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews################################################################
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews# PHONY
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews################################################################
6fac7ff1f9ec9c3873d3b55c5079fa79aba1f146Mark Andrews
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews.PHONY: all build what clobber insane \
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews fastdebug_build debug_build product_build setup \
48b492d73ae5328c5efef4b9e0f22063e0ab058aMark Andrews dev dev-build dev-sanity dev-clobber
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Force target
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsFRC:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews