Mercurial > hg > graal-jvmci-8
diff mx.jvmci/mx_jvmci_makefile.py @ 22761:f2206f5bb62e
removed @ServiceProvider mechanism (GRAAL-1380)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 30 Dec 2015 17:55:07 +0100 |
parents | a130b51efb07 |
children |
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci_makefile.py Sat Dec 26 15:00:55 2015 +0100 +++ b/mx.jvmci/mx_jvmci_makefile.py Wed Dec 30 17:55:07 2015 +0100 @@ -159,9 +159,7 @@ HS_COMMON_SRC=. # Directories, where the generated property-files reside within the JAR files -PROVIDERS_INF=/META-INF/jvmci.providers SERVICES_INF=/META-INF/jvmci.services -OPTIONS_INF=/META-INF/jvmci.options JARS = $(foreach dist,$(DISTRIBUTIONS),$($(dist)_JAR)) @@ -176,23 +174,6 @@ space := space += -# Takes the provider files created by ServiceProviderProcessor (the processor -# for the @ServiceProvider annotation) and merges them into a single file. -# Arguments: -# 1: directory with contents of the JAR file -define process_providers - $(eval providers := $(1)/$(PROVIDERS_INF)) - $(eval services := $(1)/$(SERVICES_INF)) - $(QUIETLY) test -d $(services) || mkdir -p $(services) - $(QUIETLY) test ! -d $(providers) || (cd $(providers) && for i in $$(ls); do c=$$(cat $$i); echo $$i >> $(abspath $(services))/$$c; rm $$i; done) - - @# Since all projects are built together with one javac call we cannot determine - @# which project contains HotSpotVMConfig.inline.hpp so we hardcode it. - $(eval vmconfig := $(1)/hotspot/HotSpotVMConfig.inline.hpp) - $(eval vmconfigDest := $(HS_COMMON_SRC)/../mxbuild/jvmci/jdk.vm.ci.hotspot/src_gen/hotspot) - $(QUIETLY) test ! -f $(vmconfig) || (mkdir -p $(vmconfigDest) && cp $(vmconfig) $(vmconfigDest)) -endef - # Extracts META-INF/jvmci.services from a JAR file into a given directory # Arguments: # 1: JAR file to extract @@ -216,7 +197,13 @@ $(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) test "$(3)" = "" || cp -r $(3) $(TMP) - $(QUIETLY) $(call process_providers,$(TMP)) + + @# Since all projects are built together with one javac call we cannot determine + @# which project contains HotSpotVMConfig.inline.hpp so we hardcode it. + $(eval vmconfig := $(TMP)/hotspot/HotSpotVMConfig.inline.hpp) + $(eval vmconfigDest := $(HS_COMMON_SRC)/../mxbuild/jvmci/jdk.vm.ci.hotspot/src_gen/hotspot) + $(QUIETLY) test ! -f $(vmconfig) || (mkdir -p $(vmconfigDest) && cp $(vmconfig) $(vmconfigDest)) + $(QUIETLY) mkdir -p $(shell dirname $(4)) $(QUIETLY) $(JAR) -0cf $(4) -C $(TMP) . $(QUIETLY) rm -r $(TMP)