make/HotspotWrapper.gmk
author duke
Wed, 05 Jul 2017 21:31:37 +0200
changeset 36782 6072af7a98be
parent 36506 17612cee3530
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
BASE_SPEC:=$(SPEC)
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 35033
diff changeset
    28
# Assign to HOTSPOT_SPEC so that the variable HOTSPOT_SPEC can be
17612cee3530 8142968: Module System implementation
alanb
parents: 35033
diff changeset
    29
# overridden when building the buildjdk.
17612cee3530 8142968: Module System implementation
alanb
parents: 35033
diff changeset
    30
HOTSPOT_SPEC := $(dir $(SPEC))hotspot-spec.gmk
17612cee3530 8142968: Module System implementation
alanb
parents: 35033
diff changeset
    31
include $(HOTSPOT_SPEC)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
include MakeBase.gmk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    34
# Inclusion of this pseudo-target will cause make to execute this file
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
# serially, regardless of -j. Recursively called makefiles will not be
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    36
# affected, however. This is required for correct dependency management.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
.NOTPARALLEL:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    38
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
default: all
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    40
35008
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 29662
diff changeset
    41
# Get all files in src, make or agent subdirs in hotspot directory and
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 29662
diff changeset
    42
# filter out .hg. This skips the test directory.
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 29662
diff changeset
    43
HOTSPOT_FILES := $(shell $(FIND) -L \
35033
36613b800836 8147786: Building hotspot gives error message from find
erikj
parents: 35008
diff changeset
    44
    $(HOTSPOT_TOPDIR)/src $(HOTSPOT_TOPDIR)/make \
35008
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 29662
diff changeset
    45
    -name ".hg" -prune -o -print)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    46
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    47
# The old build creates hotspot output dir before calling hotspot and
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    48
# not doing it breaks builds on msys.
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    50
	@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 35033
diff changeset
    51
	($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(HOTSPOT_MAKE_ARGS) \
35008
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 29662
diff changeset
    52
	    LOG_LEVEL=$(LOG_LEVEL) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
	$(TOUCH) $@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    54
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    56
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
all: hotspot
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    58
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    59
.PHONY: default all hotspot