make/hotspot-rules.gmk

Fri, 04 Jan 2013 21:04:03 -0800

author
ohair
date
Fri, 04 Jan 2013 21:04:03 -0800
changeset 570
5cf7750c8c43
parent 423
4d45c7117e23
permissions
-rw-r--r--

8004229: build-infra: Umbrella for switch of default "make" to new makefiles
Reviewed-by: erikj, tbell

duke@2 1 #
dcubed@423 2 # Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
duke@2 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@2 4 #
duke@2 5 # This code is free software; you can redistribute it and/or modify it
duke@2 6 # under the terms of the GNU General Public License version 2 only, as
ohair@182 7 # published by the Free Software Foundation. Oracle designates this
duke@2 8 # particular file as subject to the "Classpath" exception as provided
ohair@182 9 # by Oracle in the LICENSE file that accompanied this code.
duke@2 10 #
duke@2 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@2 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@2 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@2 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@2 15 # accompanied this code).
duke@2 16 #
duke@2 17 # You should have received a copy of the GNU General Public License version
duke@2 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@2 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@2 20 #
ohair@182 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@182 22 # or visit www.oracle.com if you need additional information or have any
ohair@182 23 # questions.
duke@2 24 #
duke@2 25
duke@2 26 ################################################################
duke@2 27 # HOTSPOT TARGETS
duke@2 28 ################################################################
duke@2 29
duke@2 30 # All the output from a hotspot build should be re-located to the
duke@2 31 # build output area.
duke@2 32 #
duke@2 33 HOTSPOT_OUTPUTDIR = $(HOTSPOT_DIR)/outputdir
duke@2 34
duke@2 35 # HOTSPOT_EXPORT_PATH points to a dir that contains files
duke@2 36 # that are needed in an SDK build, in the same relative positions as
duke@2 37 # these files are in an SDK image.
duke@2 38 # The SDK java/redist/Makefile will copy files from HOTSPOT_EXPORT_PATH
duke@2 39 # into the SDK being built.
duke@2 40 # This is the export path supplied to the hotspot makefiles.
duke@2 41 #
duke@2 42 HOTSPOT_EXPORT_PATH = $(HOTSPOT_DIR)/import
duke@2 43
duke@2 44 # Default targets
duke@2 45 HOTSPOT = hotspot-sanity hotspot-build
duke@2 46
duke@2 47 hotspot:: $(HOTSPOT)
duke@2 48
duke@2 49 # Hotspot clobber removes the output directory and exported files
duke@2 50 hotspot-clobber::
duke@2 51 $(RM) -r $(HOTSPOT_OUTPUTDIR)
duke@2 52 $(RM) -r $(HOTSPOT_EXPORT_PATH)
duke@2 53
duke@2 54 hotspot-sanity::
duke@2 55 @$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
duke@2 56 @$(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
duke@2 57 @$(ECHO) "Hotspot Settings: \n" \
duke@2 58 " HOTSPOT_BUILD_JOBS = $(HOTSPOT_BUILD_JOBS) \n" \
duke@2 59 " HOTSPOT_OUTPUTDIR = $(HOTSPOT_OUTPUTDIR) \n" \
duke@2 60 " HOTSPOT_EXPORT_PATH = $(HOTSPOT_EXPORT_PATH) \n" \
duke@2 61 "\n" >> $(MESSAGE_FILE)
duke@2 62
duke@2 63 #
duke@2 64 # Basic hotspot build and export of it's files
duke@2 65 #
duke@2 66
duke@2 67 HOTSPOT_TARGET = all_product
duke@2 68 ifeq ($(DEBUG_NAME), debug)
duke@2 69 HOTSPOT_TARGET = all_debug
duke@2 70 endif
duke@2 71 ifeq ($(DEBUG_NAME), fastdebug)
duke@2 72 HOTSPOT_TARGET = all_fastdebug
duke@2 73 endif
dcubed@423 74 BUILD_FLAVOR=$(HOTSPOT_TARGET:all_%=%)
duke@2 75
gbenson@136 76 ifeq ($(ZERO_BUILD), true)
gbenson@217 77 ifeq ($(SHARK_BUILD), true)
gbenson@217 78 HOTSPOT_TARGET := $(HOTSPOT_TARGET)shark
gbenson@217 79 else
gbenson@217 80 HOTSPOT_TARGET := $(HOTSPOT_TARGET)zero
gbenson@217 81 endif
gbenson@136 82 endif
gbenson@136 83
duke@2 84 HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS)
duke@2 85 HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
duke@2 86 HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH)
dcubed@423 87 HOTSPOT_BUILD_ARGUMENTS += BUILD_FLAVOR=$(BUILD_FLAVOR)
duke@2 88
duke@2 89 # Why do these need to be passed in? Because of windows nmake? and MAKEFLAGS=?
duke@2 90 # Or is there something wrong with hotspot/make/Makefile?
duke@2 91 HOTSPOT_BUILD_ARGUMENTS += ALT_SLASH_JAVA=$(SLASH_JAVA)
duke@2 92 HOTSPOT_BUILD_ARGUMENTS += ALT_BOOTDIR=$(BOOTDIR)
duke@2 93
duke@2 94 ifeq ($(BUILD_LANGTOOLS), true)
duke@2 95 HOTSPOT_BUILD_ARGUMENTS += ALT_LANGTOOLS_DIST=$(ABS_LANGTOOLS_DIST)
duke@2 96 endif
duke@2 97
dcubed@423 98 # Move to COMMON_BUILD_ARGUMENTS when all repos support
dcubed@423 99 # FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES:
dcubed@423 100 ifdef FULL_DEBUG_SYMBOLS
dcubed@423 101 HOTSPOT_BUILD_ARGUMENTS += FULL_DEBUG_SYMBOLS=$(FULL_DEBUG_SYMBOLS)
dcubed@423 102 endif
dcubed@423 103
dcubed@423 104 ifdef ZIP_DEBUGINFO_FILES
dcubed@423 105 HOTSPOT_BUILD_ARGUMENTS += ZIP_DEBUGINFO_FILES="$(ZIP_DEBUGINFO_FILES)"
dcubed@423 106 endif
dcubed@423 107
duke@2 108 hotspot-build::
duke@2 109 $(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
duke@2 110 $(MKDIR) -p $(HOTSPOT_EXPORT_PATH)
ohrstrom@313 111 @$(call MakeStart,hotspot,$(HOTSPOT_TARGET))
duke@2 112 $(CD) $(HOTSPOT_TOPDIR)/make && \
duke@2 113 $(MAKE) $(HOTSPOT_BUILD_ARGUMENTS) $(HOTSPOT_TARGET)
ohrstrom@313 114 @$(call MakeFinish,hotspot,$(HOTSPOT_TARGET))
duke@2 115
duke@2 116 #####################
duke@2 117 # .PHONY
duke@2 118 #####################
duke@2 119 .PHONY: hotspot-build hotspot-clobber hotspot-sanity
duke@2 120

mercurial