annotate make/linux/makefiles/buildtree.make @ 5897:7292cff45988

7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable Reviewed-by: dholmes, ohrstrom, ohair, jcoomes
author erikj
date Wed, 22 Feb 2012 09:24:35 +0100
parents e8a4934564b2
children 3d7ea1dbe0de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
2 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1010
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1010
diff changeset
20 # or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1010
diff changeset
21 # questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Usage:
a61af66fc99e Initial load
duke
parents:
diff changeset
26 #
2192
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 2027
diff changeset
27 # $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
0
a61af66fc99e Initial load
duke
parents:
diff changeset
28 # GAMMADIR=dir OS_FAMILY=os VARIANT=variant
a61af66fc99e Initial load
duke
parents:
diff changeset
29 #
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # environment or on the command-line:
a61af66fc99e Initial load
duke
parents:
diff changeset
32 #
a61af66fc99e Initial load
duke
parents:
diff changeset
33 # ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
a61af66fc99e Initial load
duke
parents:
diff changeset
34 # BUILDARCH - build directory
a61af66fc99e Initial load
duke
parents:
diff changeset
35 # LIBARCH - the corresponding directory in JDK/JRE
a61af66fc99e Initial load
duke
parents:
diff changeset
36 # GAMMADIR - top of workspace
a61af66fc99e Initial load
duke
parents:
diff changeset
37 # OS_FAMILY - operating system
a61af66fc99e Initial load
duke
parents:
diff changeset
38 # VARIANT - core, compiler1, compiler2, or tiered
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
1977
c7db7adb83b4 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 1681
diff changeset
40 # HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
0
a61af66fc99e Initial load
duke
parents:
diff changeset
41 # JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
a61af66fc99e Initial load
duke
parents:
diff changeset
42 #
a61af66fc99e Initial load
duke
parents:
diff changeset
43 # Builds the directory trees with makefiles plus some convenience files in
a61af66fc99e Initial load
duke
parents:
diff changeset
44 # each directory:
a61af66fc99e Initial load
duke
parents:
diff changeset
45 #
a61af66fc99e Initial load
duke
parents:
diff changeset
46 # Makefile - for "make foo"
a61af66fc99e Initial load
duke
parents:
diff changeset
47 # flags.make - with macro settings
a61af66fc99e Initial load
duke
parents:
diff changeset
48 # vm.make - to support making "$(MAKE) -v vm.make" in makefiles
a61af66fc99e Initial load
duke
parents:
diff changeset
49 # adlc.make -
a61af66fc99e Initial load
duke
parents:
diff changeset
50 # jvmti.make - generate JVMTI bindings from the spec (JSR-163)
a61af66fc99e Initial load
duke
parents:
diff changeset
51 # sa.make - generate SA jar file and natives
a61af66fc99e Initial load
duke
parents:
diff changeset
52 # env.[ck]sh - environment settings
a61af66fc99e Initial load
duke
parents:
diff changeset
53 # test_gamma - script to run the Queens program
a61af66fc99e Initial load
duke
parents:
diff changeset
54 #
a61af66fc99e Initial load
duke
parents:
diff changeset
55 # The makefiles are split this way so that "make foo" will run faster by not
a61af66fc99e Initial load
duke
parents:
diff changeset
56 # having to read the dependency files for the vm.
a61af66fc99e Initial load
duke
parents:
diff changeset
57
5897
7292cff45988 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 4846
diff changeset
58 -include $(SPEC)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
59 include $(GAMMADIR)/make/scm.make
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
60 include $(GAMMADIR)/make/altsrc.make
2192
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 2027
diff changeset
61
0
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 # 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
a61af66fc99e Initial load
duke
parents:
diff changeset
64 QUIETLY$(MAKE_VERBOSE) = @
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 # For now, until the compiler is less wobbly:
a61af66fc99e Initial load
duke
parents:
diff changeset
67 TESTFLAGS = -Xbatch -showversion
a61af66fc99e Initial load
duke
parents:
diff changeset
68
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
69 ifeq ($(ZERO_BUILD), true)
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
70 PLATFORM_FILE = $(shell dirname $(shell dirname $(shell pwd)))/platform_zero
50
485d403e94e1 6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents: 0
diff changeset
71 else
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
72 ifdef USE_SUNCC
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
73 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
74 else
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
75 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH)
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
76 endif
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
77 endif
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
78
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
79 # Allow overriding of the arch part of the directory but default
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
80 # to BUILDARCH if nothing is specified
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
81 ifeq ($(VARIANTARCH),)
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
82 VARIANTARCH=$(BUILDARCH)
50
485d403e94e1 6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents: 0
diff changeset
83 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 ifdef FORCE_TIERED
a61af66fc99e Initial load
duke
parents:
diff changeset
86 ifeq ($(VARIANT),tiered)
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
87 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_compiler2
0
a61af66fc99e Initial load
duke
parents:
diff changeset
88 else
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
89 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
90 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
91 else
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
92 PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
93 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 #
a61af66fc99e Initial load
duke
parents:
diff changeset
96 # We do two levels of exclusion in the shared directory.
a61af66fc99e Initial load
duke
parents:
diff changeset
97 # TOPLEVEL excludes are pruned, they are not recursively searched,
a61af66fc99e Initial load
duke
parents:
diff changeset
98 # but lower level directories can be named without fear of collision.
a61af66fc99e Initial load
duke
parents:
diff changeset
99 # ALWAYS excludes are excluded at any level in the directory tree.
a61af66fc99e Initial load
duke
parents:
diff changeset
100 #
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS)
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 ifeq ($(VARIANT),tiered)
a61af66fc99e Initial load
duke
parents:
diff changeset
105 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent
a61af66fc99e Initial load
duke
parents:
diff changeset
106 else
a61af66fc99e Initial load
duke
parents:
diff changeset
107 ifeq ($(VARIANT),compiler2)
a61af66fc99e Initial load
duke
parents:
diff changeset
108 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name c1 -o -name agent
a61af66fc99e Initial load
duke
parents:
diff changeset
109 else
a61af66fc99e Initial load
duke
parents:
diff changeset
110 # compiler1 and core use the same exclude list
a61af66fc99e Initial load
duke
parents:
diff changeset
111 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name opto -o -name libadt -o -name agent
a61af66fc99e Initial load
duke
parents:
diff changeset
112 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
113 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 # Get things from the platform file.
a61af66fc99e Initial load
duke
parents:
diff changeset
116 COMPILER = $(shell sed -n 's/^compiler[ ]*=[ ]*//p' $(PLATFORM_FILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 SIMPLE_DIRS = \
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
119 $(PLATFORM_DIR)/generated/dependencies \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
120 $(PLATFORM_DIR)/generated/adfiles \
a61af66fc99e Initial load
duke
parents:
diff changeset
121 $(PLATFORM_DIR)/generated/jvmtifiles
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 TARGETS = debug fastdebug jvmg optimized product profiled
a61af66fc99e Initial load
duke
parents:
diff changeset
124 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 # For dependencies and recursive makes.
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
127 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
0
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
130 env.sh env.csh jdkpath.sh .dbxrc test_gamma
0
a61af66fc99e Initial load
duke
parents:
diff changeset
131
a61af66fc99e Initial load
duke
parents:
diff changeset
132 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
2192
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 2027
diff changeset
133 SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
134
a61af66fc99e Initial load
duke
parents:
diff changeset
135 # Define variables to be set in flags.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
136 # Default values are set in make/defs.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
137 ifeq ($(HOTSPOT_BUILD_VERSION),)
a61af66fc99e Initial load
duke
parents:
diff changeset
138 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
139 else
a61af66fc99e Initial load
duke
parents:
diff changeset
140 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
141 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
142 # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
a61af66fc99e Initial load
duke
parents:
diff changeset
143 ifndef HOTSPOT_BUILD_USER
a61af66fc99e Initial load
duke
parents:
diff changeset
144 HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
a61af66fc99e Initial load
duke
parents:
diff changeset
145 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
146 ifndef HOTSPOT_BUILD_USER
a61af66fc99e Initial load
duke
parents:
diff changeset
147 HOTSPOT_BUILD_USER := $(shell whoami)
a61af66fc99e Initial load
duke
parents:
diff changeset
148 endif
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
149 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
150 # or make/hotspot_distro.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
151 ifndef HOTSPOT_VM_DISTRO
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
152 ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
153 include $(GAMMADIR)/make/hotspot_distro
0
a61af66fc99e Initial load
duke
parents:
diff changeset
154 else
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
155 include $(GAMMADIR)/make/openjdk_distro
0
a61af66fc99e Initial load
duke
parents:
diff changeset
156 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
157 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 BUILDTREE = \
a61af66fc99e Initial load
duke
parents:
diff changeset
162 $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 BUILDTREE_COMMENT = echo "\# Generated by $(BUILDTREE_MAKE)"
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 all: $(SUBMAKE_DIRS)
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 # Run make in each subdirectory recursively.
a61af66fc99e Initial load
duke
parents:
diff changeset
169 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
170 $(QUIETLY) [ -d $@ ] || { mkdir -p $@; }
a61af66fc99e Initial load
duke
parents:
diff changeset
171 $(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F)
a61af66fc99e Initial load
duke
parents:
diff changeset
172 $(QUIETLY) touch $@
a61af66fc99e Initial load
duke
parents:
diff changeset
173
a61af66fc99e Initial load
duke
parents:
diff changeset
174 $(SIMPLE_DIRS):
a61af66fc99e Initial load
duke
parents:
diff changeset
175 $(QUIETLY) mkdir -p $@
a61af66fc99e Initial load
duke
parents:
diff changeset
176
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
177 # Convenience macro which takes a source relative path, applies $(1) to the
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
178 # absolute path, and then replaces $(GAMMADIR) in the result with a
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
179 # literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
180 gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
181
0
a61af66fc99e Initial load
duke
parents:
diff changeset
182 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
a61af66fc99e Initial load
duke
parents:
diff changeset
183 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
184 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
185 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
186 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
187 echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
188 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
a61af66fc99e Initial load
duke
parents:
diff changeset
189 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
190 echo "GAMMADIR = $(GAMMADIR)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
191 echo "SYSDEFS = \$$(Platform_sysdefs)"; \
2192
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 2027
diff changeset
192 echo "SRCARCH = $(SRCARCH)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
193 echo "BUILDARCH = $(BUILDARCH)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
194 echo "LIBARCH = $(LIBARCH)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
195 echo "TARGET = $(TARGET)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
196 echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
197 echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
198 echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
199 echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
200 echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
201 echo; \
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
202 echo "# Used for platform dispatching"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
203 echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
204 echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
205 echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
206 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
207 echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
208 echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
209 echo "CFLAGS += \$$(TARGET_DEFINES)"; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
210 echo; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
211 echo "Src_Dirs_V = \\"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
212 sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
213 echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
214 echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
215 echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
216 echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
217 echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
218 echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
219 echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
220 echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
221 echo; \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1681
diff changeset
222 echo "Src_Dirs_I = \\"; \
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
223 echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
224 echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
225 echo "$(call gamma-path,altsrc,share/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
226 echo "$(call gamma-path,commonsrc,share/vm) \\"; \
4033
95009f678859 7106766: Move the precompiled header from the src/share/vm directory
brutisso
parents: 3954
diff changeset
227 echo "$(call gamma-path,altsrc,share/vm/precompiled) \\"; \
95009f678859 7106766: Move the precompiled header from the src/share/vm directory
brutisso
parents: 3954
diff changeset
228 echo "$(call gamma-path,commonsrc,share/vm/precompiled) \\"; \
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
229 echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
230 echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
231 echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
232 echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
233 echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
234 echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
235 echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
236 echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
237 [ -n "$(CFLAGS_BROWSE)" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
238 echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
3954
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 2199
diff changeset
239 [ -n "$(OBJCOPY)" ] && \
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 2199
diff changeset
240 echo && echo "OBJCOPY = $(OBJCOPY)"; \
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 2199
diff changeset
241 [ -n "$(STRIP_POLICY)" ] && \
da0999c4b733 7071904: 4/4 HotSpot: Full Debug Symbols
dcubed
parents: 2199
diff changeset
242 echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
243 [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
244 echo && \
a61af66fc99e Initial load
duke
parents:
diff changeset
245 echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
a61af66fc99e Initial load
duke
parents:
diff changeset
246 echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
247 echo; \
5897
7292cff45988 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 4846
diff changeset
248 [ -n "$(SPEC)" ] && \
7292cff45988 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents: 4846
diff changeset
249 echo "include $(SPEC)"; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
250 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
251 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
252 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
a61af66fc99e Initial load
duke
parents:
diff changeset
255 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
256 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
257 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
258 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
259 [ "$(TARGET)" = profiled ] && \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
260 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/optimized.make"; \
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
261 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
262 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
263
a61af66fc99e Initial load
duke
parents:
diff changeset
264 ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
a61af66fc99e Initial load
duke
parents:
diff changeset
265 @echo Creating directory list $@
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
266 $(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
267 find $(HS_ALT_SRC)/share/vm/* -prune \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
268 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
269 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
270 fi;
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
271 $(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
272 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
2199
d8a72fbc4be7 7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents: 2192
diff changeset
273 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
274
a61af66fc99e Initial load
duke
parents:
diff changeset
275 Makefile: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
276 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
277 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
278 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
279 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
280 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
281 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
282 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
283 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
284
a61af66fc99e Initial load
duke
parents:
diff changeset
285 vm.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
286 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
287 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
288 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
289 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
290 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
291 echo include flags_vm.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
292 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
293 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
294 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
295
a61af66fc99e Initial load
duke
parents:
diff changeset
296 adlc.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
297 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
298 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
299 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
300 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
301 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
302 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
303 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
304 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
305
a61af66fc99e Initial load
duke
parents:
diff changeset
306 jvmti.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
307 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
308 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
309 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
310 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
311 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
312 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
313 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
314 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
315
a61af66fc99e Initial load
duke
parents:
diff changeset
316 sa.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
317 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
318 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
319 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
320 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
321 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
322 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
323 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
324 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
325
a61af66fc99e Initial load
duke
parents:
diff changeset
326 env.sh: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
327 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
328 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
329 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
330 [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \
a61af66fc99e Initial load
duke
parents:
diff changeset
331 { \
a61af66fc99e Initial load
duke
parents:
diff changeset
332 echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
333 } | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \
a61af66fc99e Initial load
duke
parents:
diff changeset
334 echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
335 echo "export JAVA_HOME CLASSPATH HOTSPOT_BUILD_USER"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
336 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
337
a61af66fc99e Initial load
duke
parents:
diff changeset
338 env.csh: env.sh
a61af66fc99e Initial load
duke
parents:
diff changeset
339 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
340 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
341 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
342 [ -n "$$JAVA_HOME" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
343 { echo "if (! \$$?JAVA_HOME) setenv JAVA_HOME \"$$JAVA_HOME\""; }; \
a61af66fc99e Initial load
duke
parents:
diff changeset
344 sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
a61af66fc99e Initial load
duke
parents:
diff changeset
345 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
346
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
347 jdkpath.sh: $(BUILDTREE_MAKE)
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
348 @echo Creating $@ ...
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
349 $(QUIETLY) ( \
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
350 $(BUILDTREE_COMMENT); \
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
351 echo "JDK=${JAVA_HOME}"; \
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
352 ) > $@
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1978
diff changeset
353
0
a61af66fc99e Initial load
duke
parents:
diff changeset
354 .dbxrc: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
355 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
356 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
357 echo "echo '# Loading $(PLATFORM_DIR)/$(TARGET)/.dbxrc'"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
358 echo "if [ -f \"\$${HOTSPOT_DBXWARE}\" ]"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
359 echo "then"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
360 echo " source \"\$${HOTSPOT_DBXWARE}\""; \
a61af66fc99e Initial load
duke
parents:
diff changeset
361 echo "elif [ -f \"\$$HOME/.dbxrc\" ]"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
362 echo "then"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
363 echo " source \"\$$HOME/.dbxrc\""; \
a61af66fc99e Initial load
duke
parents:
diff changeset
364 echo "fi"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
365 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
366
a61af66fc99e Initial load
duke
parents:
diff changeset
367 # Skip the test for product builds (which only work when installed in a JDK), to
a61af66fc99e Initial load
duke
parents:
diff changeset
368 # avoid exiting with an error and causing make to halt.
a61af66fc99e Initial load
duke
parents:
diff changeset
369 NO_TEST_MSG = \
a61af66fc99e Initial load
duke
parents:
diff changeset
370 echo "$@: skipping the test--this build must be tested in a JDK."
a61af66fc99e Initial load
duke
parents:
diff changeset
371
a61af66fc99e Initial load
duke
parents:
diff changeset
372 NO_JAVA_HOME_MSG = \
a61af66fc99e Initial load
duke
parents:
diff changeset
373 echo "JAVA_HOME must be set to run this test."
a61af66fc99e Initial load
duke
parents:
diff changeset
374
a61af66fc99e Initial load
duke
parents:
diff changeset
375 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
a61af66fc99e Initial load
duke
parents:
diff changeset
376 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
a61af66fc99e Initial load
duke
parents:
diff changeset
377
a61af66fc99e Initial load
duke
parents:
diff changeset
378 DATA_MODE/i486 = 32
a61af66fc99e Initial load
duke
parents:
diff changeset
379 DATA_MODE/sparc = 32
a61af66fc99e Initial load
duke
parents:
diff changeset
380 DATA_MODE/sparcv9 = 64
a61af66fc99e Initial load
duke
parents:
diff changeset
381 DATA_MODE/amd64 = 64
a61af66fc99e Initial load
duke
parents:
diff changeset
382 DATA_MODE/ia64 = 64
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents: 235
diff changeset
383 DATA_MODE/zero = $(ARCH_DATA_MODEL)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
384
a61af66fc99e Initial load
duke
parents:
diff changeset
385 JAVA_FLAG/32 = -d32
a61af66fc99e Initial load
duke
parents:
diff changeset
386 JAVA_FLAG/64 = -d64
a61af66fc99e Initial load
duke
parents:
diff changeset
387
a61af66fc99e Initial load
duke
parents:
diff changeset
388 WRONG_DATA_MODE_MSG = \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
389 echo "JAVA_HOME must point to a $(DATA_MODE)-bit OpenJDK."
0
a61af66fc99e Initial load
duke
parents:
diff changeset
390
1681
126ea7725993 6953477: Increase portability and flexibility of building Hotspot
bobv
parents: 1552
diff changeset
391 CROSS_COMPILING_MSG = \
126ea7725993 6953477: Increase portability and flexibility of building Hotspot
bobv
parents: 1552
diff changeset
392 echo "Cross compiling for ARCH $(CROSS_COMPILE_ARCH), skipping gamma run."
126ea7725993 6953477: Increase portability and flexibility of building Hotspot
bobv
parents: 1552
diff changeset
393
232
551f4309f476 6695777: Queens.class should be built from source, not put in source repo
ohair
parents: 91
diff changeset
394 test_gamma: $(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
0
a61af66fc99e Initial load
duke
parents:
diff changeset
395 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
396 $(QUIETLY) ( \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
397 echo "#!/bin/sh"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
398 echo ""; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
399 $(BUILDTREE_COMMENT); \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
400 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
401 echo "# Include environment settings for gamma run"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
402 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
403 echo ". ./env.sh"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
404 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
405 echo "# Do not run gamma test for cross compiles"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
406 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
407 echo "if [ -n \"$(CROSS_COMPILE_ARCH)\" ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
408 echo " $(CROSS_COMPILING_MSG)"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
409 echo " exit 0"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
410 echo "fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
411 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
412 echo "# Make sure JAVA_HOME is set as it is required for gamma"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
413 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
414 echo "if [ -z \"\$${JAVA_HOME}\" ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
415 echo " $(NO_JAVA_HOME_MSG)"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
416 echo " exit 0"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
417 echo "fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
418 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
419 echo "# Check JAVA_HOME version to be used for the test"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
420 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
421 echo "\$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion > /dev/null 2>&1"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
422 echo "if [ \$$? -ne 0 ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
423 echo " $(WRONG_DATA_MODE_MSG)"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
424 echo " exit 0"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
425 echo "fi"; \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
426 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
427 echo "# Use gamma_g if it exists"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
428 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
429 echo "GAMMA_PROG=gamma"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
430 echo "if [ -f gamma_g ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
431 echo " GAMMA_PROG=gamma_g"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
432 echo "fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
433 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
434 echo "if [ \"$(OS_VENDOR)\" = \"Darwin\" ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
435 echo " # Ensure architecture for gamma and JAVA_HOME is the same."; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
436 echo " # NOTE: gamma assumes the OpenJDK directory layout."; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
437 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
438 echo " GAMMA_ARCH=\"\`file \$${GAMMA_PROG} | awk '{print \$$NF}'\`\""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
439 echo " JVM_LIB=\"\$${JAVA_HOME}/jre/lib/libjava.$(LIBRARY_SUFFIX)\""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
440 echo " if [ ! -f \$${JVM_LIB} ]; then"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
441 echo " JVM_LIB=\"\$${JAVA_HOME}/jre/lib/$${LIBARCH}/libjava.$(LIBRARY_SUFFIX)\""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
442 echo " fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
443 echo " if [ ! -f \$${JVM_LIB} ] || [ -z \"\`file \$${JVM_LIB} | grep \$${GAMMA_ARCH}\`\" ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
444 echo " $(WRONG_DATA_MODE_MSG)"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
445 echo " exit 0"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
446 echo " fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
447 echo "fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
448 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
449 echo "# Compile Queens program for test"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
450 echo ""; \
232
551f4309f476 6695777: Queens.class should be built from source, not put in source repo
ohair
parents: 91
diff changeset
451 echo "rm -f Queens.class"; \
551f4309f476 6695777: Queens.class should be built from source, not put in source repo
ohair
parents: 91
diff changeset
452 echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \
4846
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
453 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
454 echo "# Set library path solely for gamma launcher test run"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
455 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
456 echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
457 echo "export LD_LIBRARY_PATH"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
458 echo "unset LD_LIBRARY_PATH_32"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
459 echo "unset LD_LIBRARY_PATH_64"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
460 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
461 echo "if [ \"$(OS_VENDOR)\" = \"Darwin\" ]; then "; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
462 echo " DYLD_LIBRARY_PATH=.:$${DYLD_LIBRARY_PATH:+$$DYLD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/native_threads:\$${JAVA_HOME}/jre/lib:$${DYLD_LIBRARY_PATH:+$$DYLD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
463 echo " export DYLD_LIBRARY_PATH"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
464 echo "fi"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
465 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
466 echo "# Use the gamma launcher and JAVA_HOME to run the test"; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
467 echo ""; \
e8a4934564b2 7125793: MAC: test_gamma should always work
phh
parents: 4033
diff changeset
468 echo "./\$${GAMMA_PROG} $(TESTFLAGS) Queens < /dev/null"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
469 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
470 $(QUIETLY) chmod +x $@
a61af66fc99e Initial load
duke
parents:
diff changeset
471
a61af66fc99e Initial load
duke
parents:
diff changeset
472 FORCE:
a61af66fc99e Initial load
duke
parents:
diff changeset
473
a61af66fc99e Initial load
duke
parents:
diff changeset
474 .PHONY: all FORCE