# HG changeset patch # User Stefan Anzinger # Date 1434021801 -7200 # Node ID 62da3906ab7f926a14d76282ba2c6f0520a69fff # Parent 0ab08be12bbbefe55710a6a9da2b9dfef06823fe Do not make builds in jvmci.make diff -r 0ab08be12bbb -r 62da3906ab7f make/defs.make --- a/make/defs.make Thu Jun 11 11:35:55 2015 +0200 +++ b/make/defs.make Thu Jun 11 13:23:21 2015 +0200 @@ -369,6 +369,9 @@ EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_DIR)/jvmci-hotspot.jar EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/com.oracle.jvmci.hotspot.HotSpotJVMCIBackendFactory +EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/com.oracle.jvmci.hotspot.HotSpotVMEventListener +EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/com.oracle.jvmci.options.Options +EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/com.oracle.jvmci.debug.TTYStreamProvider ifneq ("$(wildcard $(SHARED_DIR)/services/com.oracle.jvmci.hotspot.events.EventProvider)","") EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/com.oracle.jvmci.hotspot.events.EventProvider @@ -380,6 +383,7 @@ EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_OPTIONS_DIR)/com.oracle.jvmci.hotspot.HotSpotResolvedJavaMethodImpl EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_OPTIONS_DIR)/com.oracle.jvmci.hotspot.CompileTheWorld EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_OPTIONS_DIR)/com.oracle.jvmci.compiler.Compiler +EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_OPTIONS_DIR)/com.oracle.jvmci.debug.JVMCIDebugConfig .PHONY: $(HS_ALT_MAKE)/defs.make diff -r 0ab08be12bbb -r 62da3906ab7f mx/mx_graal_makefile.py --- a/mx/mx_graal_makefile.py Thu Jun 11 11:35:55 2015 +0200 +++ b/mx/mx_graal_makefile.py Thu Jun 11 13:23:21 2015 +0200 @@ -144,7 +144,7 @@ if len(classPath) > 0: mf.add_definition("{depJarsVariable} = {jarDeps}".format(**props)) if shouldExport: mf.add_definition("EXPORTED_FILES += $({name}_JAR)".format(**props)) mf.add_rule("""$({name}_JAR): $({sourcesVariableName}) {annotationProcessors} {depJarsVariableAccess} -\t$(call build_and_jar,{cpAnnotationProcessors},$(shell echo {depJarsVariableAccess} | tr ' ' ':'),{copyResources},$({name}_JAR)) +\t$(call build_and_jar,{cpAnnotationProcessors},$(subst $(space),:,{depJarsVariableAccess}),{copyResources},$({name}_JAR)) """.format(**props)) return @@ -181,6 +181,10 @@ QUIETLY=@ endif +# Required to construct a whitespace for use with subst +space := +space += + # Takes the option files of the options annotation processor and merges them into a single file # Arguments: # 1: directory with contents of the JAR file @@ -211,7 +215,7 @@ $(QUIETLY) cp $(1) $(2); endef -# Calls $(JAVAC) with the bootclasspath $(JDK_BOOTCLASSPATH); sources are taken from the automatic variable $? +# Calls $(JAVAC) with the bootclasspath $(JDK_BOOTCLASSPATH); sources are taken from the automatic variable $^ # Arguments: # 1: processorpath # 2: classpath @@ -220,7 +224,7 @@ define build_and_jar $(info Building $(4)) $(eval TMP := $(shell mkdir -p $(TARGET) && mktemp -d $(TARGET)/tmp_XXXXX)) - $(QUIETLY) $(JAVAC) -d $(TMP) -processorpath :$(1) -bootclasspath $(JDK_BOOTCLASSPATH) -cp :$(2) $(filter %.java,$?); + $(QUIETLY) $(JAVAC) -d $(TMP) -processorpath :$(1) -bootclasspath $(JDK_BOOTCLASSPATH) -cp :$(2) $(filter %.java,$^); $(QUIETLY) test "$(3)" = "" || cp -r $(3) $(TMP); $(QUIETLY) $(call process_options,$(TMP)); $(QUIETLY) mkdir -p $(shell dirname $(4)) @@ -228,12 +232,19 @@ $(QUIETLY) rm -r $(TMP); endef +# Verifies if the defs.make contain the exported files of services/ +define verify_export_def_make + $(foreach file,$(1),$(if $(shell grep '$(2)$(file)' $(3) > /dev/null && echo found), , $(error "Pattern '$(2)$(file)' not found in $(3)"))) +endef + all: default export: all \t$(info Put $(EXPORTED_FILES) into SHARED_DIR $(SHARED_DIR)) \t$(QUIETLY) mkdir -p $(SHARED_DIR) \t$(foreach export,$(EXPORTED_FILES),$(call extract,$(export),$(SHARED_DIR))) +\t$(call verify_export_def_make,$(notdir $(wildcard $(SHARED_DIR)/services/*)),EXPORT_LIST += $$(EXPORT_JRE_LIB_JVMCI_SERVICES_DIR)/,make/defs.make) +\t$(call verify_export_def_make,$(notdir $(wildcard $(SHARED_DIR)/options/*)),EXPORT_LIST += $$(EXPORT_JRE_LIB_JVMCI_OPTIONS_DIR)/,make/defs.make) .PHONY: export """)