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