bootcycle-spec.gmk.in revision 1303:291e59375885
1218885Sdim# 2218885Sdim# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3218885Sdim# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4218885Sdim# 5218885Sdim# This code is free software; you can redistribute it and/or modify it 6218885Sdim# under the terms of the GNU General Public License version 2 only, as 7218885Sdim# published by the Free Software Foundation. Oracle designates this 8218885Sdim# particular file as subject to the "Classpath" exception as provided 9218885Sdim# by Oracle in the LICENSE file that accompanied this code. 10218885Sdim# 11218885Sdim# This code is distributed in the hope that it will be useful, but WITHOUT 12218885Sdim# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13218885Sdim# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14218885Sdim# version 2 for more details (a copy is included in the LICENSE file that 15218885Sdim# accompanied this code). 16218885Sdim# 17218885Sdim# You should have received a copy of the GNU General Public License version 18218885Sdim# 2 along with this work; if not, write to the Free Software Foundation, 19218885Sdim# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20218885Sdim# 21218885Sdim# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22218885Sdim# or visit www.oracle.com if you need additional information or have any 23218885Sdim# questions. 24218885Sdim# 25218885Sdim 26218885Sdim# Support for building boot cycle builds 27218885Sdim 28218885Sdim# First include the real base spec.gmk file 29218885Sdiminclude @SPEC@ 30218885Sdim 31218885Sdim# Check that the user did not try to specify a different java to use for compiling. 32218885Sdim# On windows we need to account for fixpath being first word. 33218885Sdimifeq ($(firstword $(JAVA)),$(FIXPATH)) 34218885Sdim JAVA_EXEC_POS=2 35218885Sdimelse 36218885Sdim JAVA_EXEC_POS=1 37218885Sdimendif 38218885Sdimifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) 39218885Sdim $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) 40218885Sdimendif 41218885Sdim 42224145Sdim 43218885Sdim# Override specific values to do a boot cycle build 44218885Sdim 45218885Sdim# Use a different Boot JDK 46218885SdimBOOT_JDK := $(JDK_IMAGE_DIR) 47218885Sdim 48218885Sdim# The bootcycle build has a different output directory 49218885SdimOLD_BUILD_OUTPUT:=@BUILD_OUTPUT@ 50218885SdimBUILD_OUTPUT:=$(OLD_BUILD_OUTPUT)/bootcycle-build 51218885Sdim# The HOTSPOT_DIST dir is not defined relative to BUILD_OUTPUT in spec.gmk 52218885SdimHOTSPOT_DIST:=$(patsubst $(OLD_BUILD_OUTPUT)%, $(BUILD_OUTPUT)%, $(HOTSPOT_DIST)) 53218885SdimSJAVAC_SERVER_DIR:=$(patsubst $(OLD_BUILD_OUTPUT)%, $(BUILD_OUTPUT)%, $(SJAVAC_SERVER_DIR)) 54218885Sdim 55218885SdimJAVA_CMD:=$(BOOT_JDK)/bin/java 56221345SdimJAVAC_CMD:=$(BOOT_JDK)/bin/javac 57221345SdimJAVAH_CMD:=$(BOOT_JDK)/bin/javah 58221345SdimJAR_CMD:=$(BOOT_JDK)/bin/jar 59221345SdimNATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii 60221345SdimJARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner 61221345SdimSJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) 62221345Sdim