comparison agent/make/Makefile @ 288:70c4fb9cf899

Merge
author apangin
date Tue, 19 Aug 2008 06:02:07 -0700
parents 54499b980c23
children c18cbe5936b8
comparison
equal deleted inserted replaced
287:6e76352f1f62 288:70c4fb9cf899
28 # Generated using the build-pkglist script 28 # Generated using the build-pkglist script
29 ifeq "x$(GAMMADIR)" "x" 29 ifeq "x$(GAMMADIR)" "x"
30 include ../../make/defs.make 30 include ../../make/defs.make
31 else 31 else
32 include $(GAMMADIR)/make/defs.make 32 include $(GAMMADIR)/make/defs.make
33 endif
34
35 ifeq "x$(HOTSPOT_BUILD_VERSION)" "x"
36 SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)
37 else
38 SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
33 endif 39 endif
34 40
35 PKGLIST = \ 41 PKGLIST = \
36 sun.jvm.hotspot \ 42 sun.jvm.hotspot \
37 sun.jvm.hotspot.asm \ 43 sun.jvm.hotspot.asm \
115 sun.jvm.hotspot.ui.table \ 121 sun.jvm.hotspot.ui.table \
116 sun.jvm.hotspot.ui.tree \ 122 sun.jvm.hotspot.ui.tree \
117 sun.jvm.hotspot.ui.treetable \ 123 sun.jvm.hotspot.ui.treetable \
118 sun.jvm.hotspot.utilities \ 124 sun.jvm.hotspot.utilities \
119 sun.jvm.hotspot.utilities.memo \ 125 sun.jvm.hotspot.utilities.memo \
120 sun.jvm.hotspot.utilities.soql 126 sun.jvm.hotspot.utilities.soql \
127 com.sun.java.swing.action \
128 com.sun.java.swing.ui
121 #END PKGLIST 129 #END PKGLIST
122 130
123 # Generated using the build-filelist script 131 # Generated using the build-filelist script
124 FILELIST = \ 132 FILELIST = \
125 sun/jvm/hotspot/*.java \ 133 sun/jvm/hotspot/*.java \
196 sun/jvm/hotspot/ui/table/*.java \ 204 sun/jvm/hotspot/ui/table/*.java \
197 sun/jvm/hotspot/ui/tree/*.java \ 205 sun/jvm/hotspot/ui/tree/*.java \
198 sun/jvm/hotspot/ui/treetable/*.java \ 206 sun/jvm/hotspot/ui/treetable/*.java \
199 sun/jvm/hotspot/utilities/*.java \ 207 sun/jvm/hotspot/utilities/*.java \
200 sun/jvm/hotspot/utilities/memo/*.java \ 208 sun/jvm/hotspot/utilities/memo/*.java \
201 sun/jvm/hotspot/utilities/soql/*.java 209 sun/jvm/hotspot/utilities/soql/*.java \
210 com/sun/java/swing/action/*.java \
211 com/sun/java/swing/ui/*.java
202 #END FILELIST 212 #END FILELIST
203 213
204 ifneq "x$(ALT_BOOTDIR)" "x" 214 ifneq "x$(ALT_BOOTDIR)" "x"
205 BOOTDIR := $(ALT_BOOTDIR) 215 BOOTDIR := $(ALT_BOOTDIR)
206 endif 216 endif
218 else 228 else
219 CPS := ";" 229 CPS := ";"
220 endif 230 endif
221 231
222 SRC_DIR = ../src/share/classes 232 SRC_DIR = ../src/share/classes
223 LIB_DIR = ../src/share/lib
224 CLOSED_LIB_DIR = ../closed/src/share/lib
225 BUILD_DIR = ../build 233 BUILD_DIR = ../build
226 OUTPUT_DIR = $(BUILD_DIR)/classes 234 OUTPUT_DIR = $(BUILD_DIR)/classes
227 DOC_DIR = $(BUILD_DIR)/doc 235 DOC_DIR = $(BUILD_DIR)/doc
228 236
229 # gnumake 3.78.1 does not accept the *s, 237 # gnumake 3.78.1 does not accept the *s,
230 # so use the shell to expand them 238 # so use the shell to expand them
231 ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST)) 239 ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST))
232 ALLFILES := $(shell /bin/ls $(ALLFILES)) 240 ALLFILES := $(shell /bin/ls $(ALLFILES))
233 241
234 242 # tools.jar is used by the sa-jdi binding
235 # tools.jar is needed by the JDI - SA binding 243 CLASSPATH = $(JDK_HOME)/lib/tools.jar
236 CLASSPATH = $(LIB_DIR)/maf-1_0.jar$(CPS)$(JDK_HOME)/lib/tools.jar 244
237 CLASSPATH := $(subst \,/,$(CLASSPATH)) 245 CLASSPATH := $(subst \,/,$(CLASSPATH))
238 246
239 # FIXME: autogenerate call to rmic 247 # FIXME: autogenerate call to rmic
240 248
241 SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)" 249 SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
242 250
243 SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties 251 SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
252 JAVAC = $(JDK_HOME)/bin/javac
253 JAVADOC = $(JDK_HOME)/bin/javadoc
254 RMIC = $(JDK_HOME)/bin/rmic
244 255
245 # Tagging it on because there's no reason not to run it 256 # Tagging it on because there's no reason not to run it
246 all: filelist 257 all: filelist
247 @mkdir -p $(OUTPUT_DIR) 258 @mkdir -p $(OUTPUT_DIR)
248 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) 259 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
249 @${JDK_HOME}/bin/javac -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist 260 $(JAVAC) -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
250 @${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 261 $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
251 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js 262 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
252 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql 263 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
264 mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
265 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
266 cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
267 cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
253 268
254 allprof: filelist 269 allprof: filelist
255 @mkdir -p $(OUTPUT_DIR) 270 @mkdir -p $(OUTPUT_DIR)
256 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) 271 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
257 @${JDK_HOME}/bin/javac -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist 272 $(JAVAC) -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
258 @${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 273 $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
259 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js 274 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
260 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql 275 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
261 276 mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
277 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
278 cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
279 cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
280
281 .PHONY: filelist
262 filelist: $(ALLFILES) 282 filelist: $(ALLFILES)
263 @if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \ 283 @if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \
264 echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \ 284 echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \
265 echo ""; \ 285 echo ""; \
266 exit 1; \ 286 exit 1; \
272 natives: 292 natives:
273 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all 293 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
274 294
275 .PHONY: sa-jdi.jar 295 .PHONY: sa-jdi.jar
276 sa-jdi.jar: 296 sa-jdi.jar:
277 if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \ 297 echo "sa-jdi.jar is built by a hotspot build."
278 echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA.";\
279 exit 1; \
280 fi
281 rm -f $(BUILD_DIR)/sa-jdi.jar
282 rm -f $(OUTPUT_DIR)/jdi_class_files
283 javac -source 1.4 ClosureFinder.java -d $(OUTPUT_DIR)
284 cd $(OUTPUT_DIR) ; find sun/jvm/hotspot/jdi -name "*.class" > jdi_class_files
285 cd $(OUTPUT_DIR) ; jar cvf ../sa-jdi.jar `java ClosureFinder jdi_class_files .`
286 cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
287 cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(OUTPUT_DIR) sa.properties
288 rm -f $(OUTPUT_DIR)/ClosureFinder.class
289 rm -f $(OUTPUT_DIR)/jdi_class_files
290 298
291 docs: 299 docs:
292 @javadoc -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST) 300 @$(JAVADOC) -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST)
293 301
294 sizes: $(ALLFILES) 302 sizes: $(ALLFILES)
295 wc -l $(ALLFILES) 303 wc -l $(ALLFILES)
296 304
297 cscope: $(ALLFILES) 305 cscope: $(ALLFILES)
306 rm -f java.files
298 echo $(ALLFILES) > java.files 307 echo $(ALLFILES) > java.files
299 cscope -b -i java.files -f java.out 308 cscope -b -i java.files -f java.out
309 rm -f java.files
300 310
301 .PHONY: sa.jar 311 .PHONY: sa.jar
302 sa.jar: 312 sa.jar:
303 rm -f $(BUILD_DIR)/sa.jar 313 rm -f $(BUILD_DIR)/sa.jar
304 mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
305 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
306 cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
307 cd $(OUTPUT_DIR) ; jar cvf ../sa.jar * 314 cd $(OUTPUT_DIR) ; jar cvf ../sa.jar *
308 315
309 clean:: 316 clean::
310 rm -rf filelist 317 rm -rf filelist
311 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean 318 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean