bootcycle-spec.gmk.in revision 666:52d1b385a4ed
1237920Snp#
2237920Snp# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3237920Snp# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4237920Snp#
5237920Snp# This code is free software; you can redistribute it and/or modify it
6237920Snp# under the terms of the GNU General Public License version 2 only, as
7237920Snp# published by the Free Software Foundation.  Oracle designates this
8237920Snp# particular file as subject to the "Classpath" exception as provided
9237920Snp# by Oracle in the LICENSE file that accompanied this code.
10237920Snp#
11237920Snp# This code is distributed in the hope that it will be useful, but WITHOUT
12237920Snp# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13237920Snp# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14237920Snp# version 2 for more details (a copy is included in the LICENSE file that
15237920Snp# accompanied this code).
16237920Snp#
17237920Snp# You should have received a copy of the GNU General Public License version
18237920Snp# 2 along with this work; if not, write to the Free Software Foundation,
19237920Snp# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20237920Snp#
21237920Snp# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22237920Snp# or visit www.oracle.com if you need additional information or have any
23237920Snp# questions.
24237920Snp#
25237920Snp
26178302Skmacy# Support for building boot cycle builds
27178302Skmacy
28178302Skmacy# First include the real base spec.gmk file
29178302Skmacyinclude @SPEC@
30237920Snp
31237920Snp# Check that the user did not try to specify a different java to use for compiling.
32237920Snp# On windows we need to account for fixpath being first word.
33178302Skmacyifeq ($(firstword $(JAVA)),$(FIXPATH))
34178302Skmacy  JAVA_EXEC_POS=2
35178302Skmacyelse
36178302Skmacy  JAVA_EXEC_POS=1
37178302Skmacyendif
38178302Skmacyifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
39178302Skmacy    $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
40178302Skmacyendif
41178302Skmacy
42178302Skmacy
43237920Snp# Override specific values to do a boot cycle build
44178302Skmacy
45237920Snp# The bootcycle build has a different output directory
46237920SnpBUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
47237920Snp
48178302Skmacy# Use a different Boot JDK
49237920SnpOLD_BOOT_JDK:=$(BOOT_JDK)
50237920SnpBOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image
51237920SnpBOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar
52237920Snp
53178302SkmacySJAVAC_SERVER_JAVA:=$(subst $(OLD_BOOT_JDK),$(BOOT_JDK),$(SJAVAC_SERVER_JAVA))
54178302Skmacy