Mercurial > hg > truffle
comparison make/bsd/makefiles/sa.make @ 4108:8657ec177a14
7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
Summary: Replace SA_APPLE_BOOT_JAVA with logic that checks the boot JDK for the location of JDI classes. ALWAYS_PASS_TEST_GAMMA is true by default on Darwin.
Reviewed-by: kvn, swingler
author | dcubed |
---|---|
date | Mon, 05 Dec 2011 14:55:16 -0800 |
parents | 436b4a3231bf |
children | 5a98bf7d847b |
comparison
equal
deleted
inserted
replaced
4079:fde2a39ed7f3 | 4108:8657ec177a14 |
---|---|
35 include $(GAMMADIR)/make/sa.files | 35 include $(GAMMADIR)/make/sa.files |
36 | 36 |
37 TOPDIR = $(shell echo `pwd`) | 37 TOPDIR = $(shell echo `pwd`) |
38 GENERATED = $(TOPDIR)/../generated | 38 GENERATED = $(TOPDIR)/../generated |
39 | 39 |
40 # tools.jar is needed by the JDI - SA binding | 40 # SA-JDI depends on the standard JDI classes. |
41 ifeq ($(SA_APPLE_BOOT_JAVA),true) | 41 # Default SA_CLASSPATH location: |
42 SA_CLASSPATH = $(BOOT_JAVA_HOME)/bundle/Classes/classes.jar | 42 DEF_SA_CLASSPATH=$(BOOT_JAVA_HOME)/lib/tools.jar |
43 ifeq ($(ALT_SA_CLASSPATH),) | |
44 # no alternate specified; see if default exists | |
45 SA_CLASSPATH=$(shell test -f $(DEF_SA_CLASSPATH) && echo $(DEF_SA_CLASSPATH)) | |
46 ifeq ($(SA_CLASSPATH),) | |
47 # the default doesn't exist | |
48 ifeq ($(OS_VENDOR), Darwin) | |
49 # A JDK from Apple doesn't have tools.jar; the JDI classes are | |
50 # are in the regular classes.jar file. | |
51 APPLE_JAR=$(BOOT_JAVA_HOME)/bundle/Classes/classes.jar | |
52 SA_CLASSPATH=$(shell test -f $(APPLE_JAR) && echo $(APPLE_JAR)) | |
53 endif | |
54 endif | |
43 else | 55 else |
44 SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar | 56 _JUNK_ := $(shell echo >&2 "INFO: ALT_SA_CLASSPATH=$(ALT_SA_CLASSPATH)") |
57 SA_CLASSPATH=$(shell test -f $(ALT_SA_CLASSPATH) && echo $(ALT_SA_CLASSPATH)) | |
45 endif | 58 endif |
46 | 59 |
47 # TODO: if it's a modules image, check if SA module is installed. | 60 # TODO: if it's a modules image, check if SA module is installed. |
48 MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules | 61 MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules |
49 | 62 |
70 $(QUIETLY) echo "Making $@" | 83 $(QUIETLY) echo "Making $@" |
71 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | 84 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ |
72 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | 85 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ |
73 exit 1; \ | 86 exit 1; \ |
74 fi | 87 fi |
75 $(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \ | 88 $(QUIETLY) if [ ! -f "$(SA_CLASSPATH)" -a ! -d $(MODULELIB_PATH) ] ; then \ |
76 echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\ | 89 echo "Cannot find JDI classes. Use 1.6.0 or later version of JDK."; \ |
77 echo ""; \ | 90 echo ""; \ |
78 exit 1; \ | 91 exit 1; \ |
79 fi | 92 fi |
80 $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ | 93 $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ |
81 mkdir -p $(SA_CLASSDIR); \ | 94 mkdir -p $(SA_CLASSDIR); \ |