Makefile revision 95
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved.
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# This code is free software; you can redistribute it and/or modify it
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# under the terms of the GNU General Public License version 2 only, as
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# published by the Free Software Foundation. Sun designates this
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# particular file as subject to the "Classpath" exception as provided
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# by Sun in the LICENSE file that accompanied this code.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# This code is distributed in the hope that it will be useful, but WITHOUT
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# version 2 for more details (a copy is included in the LICENSE file that
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# accompanied this code).
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# You should have received a copy of the GNU General Public License version
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# 2 along with this work; if not, write to the Free Software Foundation,
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# CA 95054 USA or visit www.sun.com if you need additional information or
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# have any questions.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
7bfe076b680e6e591add6cdc754ce9a6910682a2sascha# For start and finish echo lines
7bfe076b680e6e591add6cdc754ce9a6910682a2saschaSTART_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
f07a80771bc5d30b1e0cfcb7256c1a302da77675rbbFINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
105475009f541187ba7a14a367547d9404c578befielding# What "all" means
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Everything for a full product build
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# Generis build of basic repo series
6ca0e6973c8176100f4a426444823ae5e777e28fsascha generic_build_repo_series:: openjdk-binary-plugs-bundles
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# The debug build, fastdebug or debug. Needs special handling.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Note that debug builds do NOT do INSTALL steps, but must be done
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# after the product build and before the INSTALL step of the product build.
1606d7656cbc08d3f3777edbdec4a7e4f9ede0a8rbb# DEBUG_NAME is fastdebug or debug
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# The resulting j2sdk-image is used by the install makefiles to create a
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# debug install bundle jdk-*-debug-** bundle (tar or zip)
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# which will install in the debug or fastdebug subdirectory of the
1606d7656cbc08d3f3777edbdec4a7e4f9ede0a8rbb# normal product install area.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# The install process needs to know what the DEBUG_NAME is, so
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# look for INSTALL_DEBUG_NAME in the install rules.
832935ea1f5cc1b21d72674929eef16ed80437d6martin# Location of fresh bootdir output
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaFRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image
d0211374a981173d4537e3f919c708b5f64040fcgstein# Create boot image?
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbb # Create the bootdir to use in the build
68de907078051f290050b089c0570d8167b3500dgstein # Define variables to be used now for the boot jdk
d0211374a981173d4537e3f919c708b5f64040fcgstein # Use the supplied ALT_BOOTDIR as the boot
c803b0d84b48f151504b87ec3f196cb433149592rbb# Build final image
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Check on whether we really can build the openjdk, need source etc.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha @$(ECHO) "================================================="
d0211374a981173d4537e3f919c708b5f64040fcgstein $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
d0211374a981173d4537e3f919c708b5f64040fcgstein $(ECHO) "OpenJDK will be built after JDK is built"; \
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz $(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
d0211374a981173d4537e3f919c708b5f64040fcgstein @$(ECHO) "================================================="
d0211374a981173d4537e3f919c708b5f64040fcgstein# If we have bundle rules, we have a chance here to do a complete cycle
d0211374a981173d4537e3f919c708b5f64040fcgstein# build, of production and open build.
d0211374a981173d4537e3f919c708b5f64040fcgstein# FIXUP: We should create the openjdk source bundle and build that?
d0211374a981173d4537e3f919c708b5f64040fcgstein# But how do we reliable create or get at a formal openjdk source tree?
d0211374a981173d4537e3f919c708b5f64040fcgstein# The one we have needs to be trimmed of built bits and closed dirs.
6fc41aa6ec95bb888598a6aa4cc74cf328ad1c7erbb# The repositories might not be available.
d0211374a981173d4537e3f919c708b5f64040fcgstein# The openjdk source bundle is probably not available.
d0211374a981173d4537e3f919c708b5f64040fcgsteinOPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
d0211374a981173d4537e3f919c708b5f64040fcgstein = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
0f47ee3ae8ede113e11f21bf34f3b11161d3e61drasmusOPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
92a2439559cf1161742650ed9c50c6483bd029cemadhum @$(ECHO) "================================================="
11ce1f263fdd8812189b85930874943f9fa81bd5fielding @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
11ce1f263fdd8812189b85930874943f9fa81bd5fielding @$(ECHO) "================================================="
da482ec6da90f2609367d840933bedd9e90e11b6wrowe @$(ECHO) "================================================="
11ce1f263fdd8812189b85930874943f9fa81bd5fielding @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
92a2439559cf1161742650ed9c50c6483bd029cemadhum @$(ECHO) "================================================="
92a2439559cf1161742650ed9c50c6483bd029cemadhum -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
92a2439559cf1161742650ed9c50c6483bd029cemadhum# Dev builds
92a2439559cf1161742650ed9c50c6483bd029cemadhum# Quick jdk verification build
da482ec6da90f2609367d840933bedd9e90e11b6wrowe $(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all
da482ec6da90f2609367d840933bedd9e90e11b6wrowe# Quick jdk verification fastdebug build
da482ec6da90f2609367d840933bedd9e90e11b6wrowe $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
92a2439559cf1161742650ed9c50c6483bd029cemadhum BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
da482ec6da90f2609367d840933bedd9e90e11b6wrowe# Quick deploy verification fastdebug build
da482ec6da90f2609367d840933bedd9e90e11b6wrowe# Product build (skip debug builds)
da482ec6da90f2609367d840933bedd9e90e11b6wrowe# Check target
92a2439559cf1161742650ed9c50c6483bd029cemadhum# Help target
92a2439559cf1161742650ed9c50c6483bd029cemadhumhelp: intro_help target_help variable_help notes_help examples_help
92a2439559cf1161742650ed9c50c6483bd029cemadhum# Intro help message
92a2439559cf1161742650ed9c50c6483bd029cemadhumMakefile for the JDK builds (all the JDK). \n\
92a2439559cf1161742650ed9c50c6483bd029cemadhum# Target help
fcdca175a52fe517f2317ba0e2b6e6d14522b869madhum--- Common Targets --- \n\
022b39bf40d1e163d794322fb7d80bd743614333wroweall -- build the core JDK (default target) \n\
fcdca175a52fe517f2317ba0e2b6e6d14522b869madhumhelp -- Print out help information \n\
022b39bf40d1e163d794322fb7d80bd743614333wrowecheck -- Check make variable values for correctness \n\
fcdca175a52fe517f2317ba0e2b6e6d14522b869madhumsanity -- Perform detailed sanity checks on system and settings \n\
022b39bf40d1e163d794322fb7d80bd743614333wrowefastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\
fcdca175a52fe517f2317ba0e2b6e6d14522b869madhumdebug_build -- build the core JDK in 'debug' mode (-g) \n\
8ae403ebccc199f41c19eb5c00ad515684687bf8wroweclean -- remove all built and imported files \n\
92a2439559cf1161742650ed9c50c6483bd029cemadhumclobber -- same as clean \n\
da482ec6da90f2609367d840933bedd9e90e11b6wrowe# Variable help (only common ones used by this Makefile)
da482ec6da90f2609367d840933bedd9e90e11b6wrowevariable_help: variable_help_intro variable_list variable_help_end
92a2439559cf1161742650ed9c50c6483bd029cemadhum# One line descriptions for the variables
92a2439559cf1161742650ed9c50c6483bd029cemadhumPARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count
92a2439559cf1161742650ed9c50c6483bd029cemadhumSLASH_JAVA.desc = Root of all build tools, e.g. /java or J:
92a2439559cf1161742650ed9c50c6483bd029cemadhumJDK_IMPORT_PATH.desc = JDK used to import components of the build
92a2439559cf1161742650ed9c50c6483bd029cemadhumDEVTOOLS_PATH.desc = Directory containing zip and gnumake
92a2439559cf1161742650ed9c50c6483bd029cemadhumCUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
1e7749fd30f80b3fa49039f446a9b9d02b27f7effieldingMSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe)
12e76edaaedf2f1495a3727c2cedbdc4506a95a6jerenkrantzMSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
11ce1f263fdd8812189b85930874943f9fa81bd5fielding# Make variables to print out (description and value)
9d432e23f6025b78322cbee43e8e89262a108e5eaaron# Make variables that should refer to directories that exist
9d432e23f6025b78322cbee43e8e89262a108e5eaaron# Make variables that should refer to files that exist
9d432e23f6025b78322cbee43e8e89262a108e5eaaron# Some are windows specific
9d432e23f6025b78322cbee43e8e89262a108e5eaaron# For pattern rules below, so all are treated the same
9d432e23f6025b78322cbee43e8e89262a108e5eaaronDO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
9d432e23f6025b78322cbee43e8e89262a108e5eaaronDO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
9d432e23f6025b78322cbee43e8e89262a108e5eaaronDO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil)
9d432e23f6025b78322cbee43e8e89262a108e5eaaron# Complete variable check
9d432e23f6025b78322cbee43e8e89262a108e5eaaronvariable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST)
%.printval:
%.checkdir:
%.checkfil:
FRC: