annotate make/linux/makefiles/buildtree.make @ 196:d1605aabd0a1 jdk7-b30

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents a294fd0c4b38
children 9c2ecc2ffb12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
196
d1605aabd0a1 6719955: Update copyright year
xdono
parents: 91
diff changeset
2 # Copyright 2005-2008 Sun Microsystems, Inc. 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 #
a61af66fc99e Initial load
duke
parents:
diff changeset
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # have any questions.
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 #
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # $(MAKE) -f buildtree.make ARCH=arch BUILDARCH=buildarch LIBARCH=libarch
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)
a61af66fc99e Initial load
duke
parents:
diff changeset
40 # HOTSPOT_BUILD_VERSION - internal, PRTjob ID, JPRTjob ID
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
a61af66fc99e Initial load
duke
parents:
diff changeset
58 include $(GAMMADIR)/make/scm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 # 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
a61af66fc99e Initial load
duke
parents:
diff changeset
61 QUIETLY$(MAKE_VERBOSE) = @
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 # For now, until the compiler is less wobbly:
a61af66fc99e Initial load
duke
parents:
diff changeset
64 TESTFLAGS = -Xbatch -showversion
a61af66fc99e Initial load
duke
parents:
diff changeset
65
50
485d403e94e1 6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents: 0
diff changeset
66 ifdef USE_SUNCC
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
67 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
50
485d403e94e1 6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents: 0
diff changeset
68 else
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
69 PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH)
50
485d403e94e1 6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents: 0
diff changeset
70 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 ifdef FORCE_TIERED
a61af66fc99e Initial load
duke
parents:
diff changeset
73 ifeq ($(VARIANT),tiered)
a61af66fc99e Initial load
duke
parents:
diff changeset
74 PLATFORM_DIR = $(OS_FAMILY)_$(BUILDARCH)_compiler2
a61af66fc99e Initial load
duke
parents:
diff changeset
75 else
a61af66fc99e Initial load
duke
parents:
diff changeset
76 PLATFORM_DIR = $(OS_FAMILY)_$(BUILDARCH)_$(VARIANT)
a61af66fc99e Initial load
duke
parents:
diff changeset
77 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
78 else
a61af66fc99e Initial load
duke
parents:
diff changeset
79 PLATFORM_DIR = $(OS_FAMILY)_$(BUILDARCH)_$(VARIANT)
a61af66fc99e Initial load
duke
parents:
diff changeset
80 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 #
a61af66fc99e Initial load
duke
parents:
diff changeset
83 # We do two levels of exclusion in the shared directory.
a61af66fc99e Initial load
duke
parents:
diff changeset
84 # TOPLEVEL excludes are pruned, they are not recursively searched,
a61af66fc99e Initial load
duke
parents:
diff changeset
85 # but lower level directories can be named without fear of collision.
a61af66fc99e Initial load
duke
parents:
diff changeset
86 # ALWAYS excludes are excluded at any level in the directory tree.
a61af66fc99e Initial load
duke
parents:
diff changeset
87 #
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS)
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 ifeq ($(VARIANT),tiered)
a61af66fc99e Initial load
duke
parents:
diff changeset
92 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent
a61af66fc99e Initial load
duke
parents:
diff changeset
93 else
a61af66fc99e Initial load
duke
parents:
diff changeset
94 ifeq ($(VARIANT),compiler2)
a61af66fc99e Initial load
duke
parents:
diff changeset
95 TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name c1 -o -name agent
a61af66fc99e Initial load
duke
parents:
diff changeset
96 else
a61af66fc99e Initial load
duke
parents:
diff changeset
97 # compiler1 and core use the same exclude list
a61af66fc99e Initial load
duke
parents:
diff changeset
98 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
99 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
100 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 # Get things from the platform file.
a61af66fc99e Initial load
duke
parents:
diff changeset
103 COMPILER = $(shell sed -n 's/^compiler[ ]*=[ ]*//p' $(PLATFORM_FILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105 SIMPLE_DIRS = \
a61af66fc99e Initial load
duke
parents:
diff changeset
106 $(PLATFORM_DIR)/generated/incls \
a61af66fc99e Initial load
duke
parents:
diff changeset
107 $(PLATFORM_DIR)/generated/adfiles \
a61af66fc99e Initial load
duke
parents:
diff changeset
108 $(PLATFORM_DIR)/generated/jvmtifiles
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 TARGETS = debug fastdebug jvmg optimized product profiled
a61af66fc99e Initial load
duke
parents:
diff changeset
111 SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 # For dependencies and recursive makes.
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
114 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \
a61af66fc99e Initial load
duke
parents:
diff changeset
117 env.sh env.csh .dbxrc test_gamma
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
a61af66fc99e Initial load
duke
parents:
diff changeset
120 ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 # Define variables to be set in flags.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
123 # Default values are set in make/defs.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
124 ifeq ($(HOTSPOT_BUILD_VERSION),)
a61af66fc99e Initial load
duke
parents:
diff changeset
125 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
126 else
a61af66fc99e Initial load
duke
parents:
diff changeset
127 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
128 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
129 # Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
a61af66fc99e Initial load
duke
parents:
diff changeset
130 ifndef HOTSPOT_BUILD_USER
a61af66fc99e Initial load
duke
parents:
diff changeset
131 HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
a61af66fc99e Initial load
duke
parents:
diff changeset
132 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
133 ifndef HOTSPOT_BUILD_USER
a61af66fc99e Initial load
duke
parents:
diff changeset
134 HOTSPOT_BUILD_USER := $(shell whoami)
a61af66fc99e Initial load
duke
parents:
diff changeset
135 endif
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
136 # 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
137 # or make/hotspot_distro.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
138 ifndef HOTSPOT_VM_DISTRO
a61af66fc99e Initial load
duke
parents:
diff changeset
139 CLOSED_DIR_EXISTS := $(shell \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
140 if [ -d $(GAMMADIR)/src/closed ] ; then \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
141 echo true; \
a61af66fc99e Initial load
duke
parents:
diff changeset
142 else \
a61af66fc99e Initial load
duke
parents:
diff changeset
143 echo false; \
a61af66fc99e Initial load
duke
parents:
diff changeset
144 fi)
a61af66fc99e Initial load
duke
parents:
diff changeset
145 ifeq ($(CLOSED_DIR_EXISTS), true)
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
146 include $(GAMMADIR)/make/hotspot_distro
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 else
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
148 include $(GAMMADIR)/make/openjdk_distro
0
a61af66fc99e Initial load
duke
parents:
diff changeset
149 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
150 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 BUILDTREE = \
a61af66fc99e Initial load
duke
parents:
diff changeset
155 $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 BUILDTREE_COMMENT = echo "\# Generated by $(BUILDTREE_MAKE)"
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 all: $(SUBMAKE_DIRS)
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 # Run make in each subdirectory recursively.
a61af66fc99e Initial load
duke
parents:
diff changeset
162 $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
163 $(QUIETLY) [ -d $@ ] || { mkdir -p $@; }
a61af66fc99e Initial load
duke
parents:
diff changeset
164 $(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F)
a61af66fc99e Initial load
duke
parents:
diff changeset
165 $(QUIETLY) touch $@
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 $(SIMPLE_DIRS):
a61af66fc99e Initial load
duke
parents:
diff changeset
168 $(QUIETLY) mkdir -p $@
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
a61af66fc99e Initial load
duke
parents:
diff changeset
171 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
172 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
173 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
174 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
175 echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
176 sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
a61af66fc99e Initial load
duke
parents:
diff changeset
177 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
178 echo "GAMMADIR = $(GAMMADIR)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
179 echo "SYSDEFS = \$$(Platform_sysdefs)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
180 echo "SRCARCH = $(ARCH)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
181 echo "BUILDARCH = $(BUILDARCH)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
182 echo "LIBARCH = $(LIBARCH)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
183 echo "TARGET = $(TARGET)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
184 echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
185 echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
186 echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
187 echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
188 echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
189 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
190 echo "Src_Dirs = \\"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
191 sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
a61af66fc99e Initial load
duke
parents:
diff changeset
192 echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
193 echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
194 echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
195 [ -n "$(CFLAGS_BROWSE)" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
196 echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
197 [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
198 echo && \
a61af66fc99e Initial load
duke
parents:
diff changeset
199 echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
a61af66fc99e Initial load
duke
parents:
diff changeset
200 echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
201 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
202 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
203 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
204 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
a61af66fc99e Initial load
duke
parents:
diff changeset
207 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
208 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
209 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
210 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
211 [ "$(TARGET)" = profiled ] && \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
212 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
213 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
214 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216 ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
a61af66fc99e Initial load
duke
parents:
diff changeset
217 @echo Creating directory list $@
a61af66fc99e Initial load
duke
parents:
diff changeset
218 $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
a61af66fc99e Initial load
duke
parents:
diff changeset
219 -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
a61af66fc99e Initial load
duke
parents:
diff changeset
220 \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222 Makefile: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
223 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
224 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
225 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
226 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
227 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
228 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
229 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
230 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 vm.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
233 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
234 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
235 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
236 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
237 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
238 echo include flags_vm.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
239 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
240 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
241 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 adlc.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
244 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
245 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
246 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
247 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
248 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
249 echo; \
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/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
251 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
252
a61af66fc99e Initial load
duke
parents:
diff changeset
253 jvmti.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
254 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
255 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
256 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
257 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
258 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
259 echo; \
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/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
261 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
262
a61af66fc99e Initial load
duke
parents:
diff changeset
263 sa.make: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
264 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
265 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
266 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
267 echo; \
a61af66fc99e Initial load
duke
parents:
diff changeset
268 echo include flags.make; \
a61af66fc99e Initial load
duke
parents:
diff changeset
269 echo; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
270 echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
271 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
272
a61af66fc99e Initial load
duke
parents:
diff changeset
273 env.sh: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
274 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
275 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
276 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
277 [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \
a61af66fc99e Initial load
duke
parents:
diff changeset
278 { \
a61af66fc99e Initial load
duke
parents:
diff changeset
279 echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
280 echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
281 } | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \
a61af66fc99e Initial load
duke
parents:
diff changeset
282 echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \
a61af66fc99e Initial load
duke
parents:
diff changeset
283 echo "export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
284 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
285
a61af66fc99e Initial load
duke
parents:
diff changeset
286 env.csh: env.sh
a61af66fc99e Initial load
duke
parents:
diff changeset
287 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
288 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
289 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
290 [ -n "$$JAVA_HOME" ] && \
a61af66fc99e Initial load
duke
parents:
diff changeset
291 { echo "if (! \$$?JAVA_HOME) setenv JAVA_HOME \"$$JAVA_HOME\""; }; \
a61af66fc99e Initial load
duke
parents:
diff changeset
292 sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
a61af66fc99e Initial load
duke
parents:
diff changeset
293 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
294
a61af66fc99e Initial load
duke
parents:
diff changeset
295 .dbxrc: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
296 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
297 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
298 echo "echo '# Loading $(PLATFORM_DIR)/$(TARGET)/.dbxrc'"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
299 echo "if [ -f \"\$${HOTSPOT_DBXWARE}\" ]"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
300 echo "then"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
301 echo " source \"\$${HOTSPOT_DBXWARE}\""; \
a61af66fc99e Initial load
duke
parents:
diff changeset
302 echo "elif [ -f \"\$$HOME/.dbxrc\" ]"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
303 echo "then"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
304 echo " source \"\$$HOME/.dbxrc\""; \
a61af66fc99e Initial load
duke
parents:
diff changeset
305 echo "fi"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
306 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
307
a61af66fc99e Initial load
duke
parents:
diff changeset
308 # Skip the test for product builds (which only work when installed in a JDK), to
a61af66fc99e Initial load
duke
parents:
diff changeset
309 # avoid exiting with an error and causing make to halt.
a61af66fc99e Initial load
duke
parents:
diff changeset
310 NO_TEST_MSG = \
a61af66fc99e Initial load
duke
parents:
diff changeset
311 echo "$@: skipping the test--this build must be tested in a JDK."
a61af66fc99e Initial load
duke
parents:
diff changeset
312
a61af66fc99e Initial load
duke
parents:
diff changeset
313 NO_JAVA_HOME_MSG = \
a61af66fc99e Initial load
duke
parents:
diff changeset
314 echo "JAVA_HOME must be set to run this test."
a61af66fc99e Initial load
duke
parents:
diff changeset
315
a61af66fc99e Initial load
duke
parents:
diff changeset
316 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
a61af66fc99e Initial load
duke
parents:
diff changeset
317 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
a61af66fc99e Initial load
duke
parents:
diff changeset
318
a61af66fc99e Initial load
duke
parents:
diff changeset
319 DATA_MODE/i486 = 32
a61af66fc99e Initial load
duke
parents:
diff changeset
320 DATA_MODE/sparc = 32
a61af66fc99e Initial load
duke
parents:
diff changeset
321 DATA_MODE/sparcv9 = 64
a61af66fc99e Initial load
duke
parents:
diff changeset
322 DATA_MODE/amd64 = 64
a61af66fc99e Initial load
duke
parents:
diff changeset
323 DATA_MODE/ia64 = 64
a61af66fc99e Initial load
duke
parents:
diff changeset
324
a61af66fc99e Initial load
duke
parents:
diff changeset
325 JAVA_FLAG/32 = -d32
a61af66fc99e Initial load
duke
parents:
diff changeset
326 JAVA_FLAG/64 = -d64
a61af66fc99e Initial load
duke
parents:
diff changeset
327
a61af66fc99e Initial load
duke
parents:
diff changeset
328 WRONG_DATA_MODE_MSG = \
a61af66fc99e Initial load
duke
parents:
diff changeset
329 echo "JAVA_HOME must point to $(DATA_MODE)bit JDK."
a61af66fc99e Initial load
duke
parents:
diff changeset
330
a61af66fc99e Initial load
duke
parents:
diff changeset
331 test_gamma: $(BUILDTREE_MAKE)
a61af66fc99e Initial load
duke
parents:
diff changeset
332 @echo Creating $@ ...
a61af66fc99e Initial load
duke
parents:
diff changeset
333 $(QUIETLY) ( \
a61af66fc99e Initial load
duke
parents:
diff changeset
334 echo '#!/bin/sh'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
335 $(BUILDTREE_COMMENT); \
a61af66fc99e Initial load
duke
parents:
diff changeset
336 echo '. ./env.sh'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
337 echo "if [ -z \$$JAVA_HOME ]; then { $(NO_JAVA_HOME_MSG); exit 0; }; fi"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
338 echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>1 > /dev/null"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
339 echo "then"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
340 echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \
a61af66fc99e Initial load
duke
parents:
diff changeset
341 echo "fi"; \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 50
diff changeset
342 echo 'CLASSPATH="$(GAMMADIR)/make/$(OS_FAMILY):$$CLASSPATH"'; \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
343 echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
344 echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \
a61af66fc99e Initial load
duke
parents:
diff changeset
345 ) > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
346 $(QUIETLY) chmod +x $@
a61af66fc99e Initial load
duke
parents:
diff changeset
347
a61af66fc99e Initial load
duke
parents:
diff changeset
348 FORCE:
a61af66fc99e Initial load
duke
parents:
diff changeset
349
a61af66fc99e Initial load
duke
parents:
diff changeset
350 .PHONY: all FORCE