bootcycle-spec.gmk.in revision 1307:9e57473496a4
1193156Snwhitehorn# 2193156Snwhitehorn# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3193156Snwhitehorn# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4193156Snwhitehorn# 5193156Snwhitehorn# This code is free software; you can redistribute it and/or modify it 6193156Snwhitehorn# under the terms of the GNU General Public License version 2 only, as 7193156Snwhitehorn# published by the Free Software Foundation. Oracle designates this 8193156Snwhitehorn# particular file as subject to the "Classpath" exception as provided 9193156Snwhitehorn# by Oracle in the LICENSE file that accompanied this code. 10193156Snwhitehorn# 11193156Snwhitehorn# This code is distributed in the hope that it will be useful, but WITHOUT 12193156Snwhitehorn# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13193156Snwhitehorn# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14193156Snwhitehorn# version 2 for more details (a copy is included in the LICENSE file that 15193156Snwhitehorn# accompanied this code). 16193156Snwhitehorn# 17193156Snwhitehorn# You should have received a copy of the GNU General Public License version 18193156Snwhitehorn# 2 along with this work; if not, write to the Free Software Foundation, 19193156Snwhitehorn# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20193156Snwhitehorn# 21193156Snwhitehorn# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22193156Snwhitehorn# or visit www.oracle.com if you need additional information or have any 23193156Snwhitehorn# questions. 24193156Snwhitehorn# 25193156Snwhitehorn 26193156Snwhitehorn# Support for building boot cycle builds 27193156Snwhitehorn 28193156Snwhitehorn# First include the real base spec.gmk file 29193156Snwhitehorninclude @SPEC@ 30193156Snwhitehorn 31193156Snwhitehorn# Check that the user did not try to specify a different java to use for compiling. 32193156Snwhitehorn# On windows we need to account for fixpath being first word. 33193156Snwhitehornifeq ($(firstword $(JAVA)),$(FIXPATH)) 34193156Snwhitehorn JAVA_EXEC_POS=2 35193156Snwhitehornelse 36193156Snwhitehorn JAVA_EXEC_POS=1 37193156Snwhitehornendif 38193156Snwhitehornifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) 39193156Snwhitehorn $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) 40193156Snwhitehornendif 41193156Snwhitehorn 42193156Snwhitehorn 43193156Snwhitehorn# Override specific values to do a boot cycle build 44193156Snwhitehorn 45193156Snwhitehorn# Use a different Boot JDK 46193156SnwhitehornBOOT_JDK := $(JDK_IMAGE_DIR) 47193156Snwhitehorn 48193156Snwhitehorn# The bootcycle build has a different output directory 49193156SnwhitehornOLD_BUILD_OUTPUT:=@BUILD_OUTPUT@ 50193156SnwhitehornBUILD_OUTPUT:=$(OLD_BUILD_OUTPUT)/bootcycle-build 51193156Snwhitehorn# The HOTSPOT_DIST dir is not defined relative to BUILD_OUTPUT in spec.gmk. Must not 52193156Snwhitehorn# use space in this patsubst to avoid leading space in HOTSPOT_DIST. 53193156SnwhitehornHOTSPOT_DIST:=$(patsubst $(OLD_BUILD_OUTPUT)%,$(BUILD_OUTPUT)%,$(HOTSPOT_DIST)) 54193156SnwhitehornSJAVAC_SERVER_DIR:=$(patsubst $(OLD_BUILD_OUTPUT)%, $(BUILD_OUTPUT)%, $(SJAVAC_SERVER_DIR)) 55193156Snwhitehorn 56193156SnwhitehornJAVA_CMD:=$(BOOT_JDK)/bin/java 57193156SnwhitehornJAVAC_CMD:=$(BOOT_JDK)/bin/javac 58193156SnwhitehornJAVAH_CMD:=$(BOOT_JDK)/bin/javah 59193156SnwhitehornJAR_CMD:=$(BOOT_JDK)/bin/jar 60193156SnwhitehornNATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii 61193156SnwhitehornJARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner 62193156SnwhitehornSJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) 63193156Snwhitehorn