Mercurial > hg > graal-jvmci-8
comparison make/jvmci.make @ 21943:31be1c8f4905
switched to use of simple makefile assignment in jvmci.make and removed unnecessary semicolons
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 12 Jun 2015 15:33:11 +0200 |
parents | eac31af360db |
children | b121c00d3c4c |
comparison
equal
deleted
inserted
replaced
21942:ebc99adcd766 | 21943:31be1c8f4905 |
---|---|
28 # Takes the provider files created by ServiceProviderProcessor (the processor | 28 # Takes the provider files created by ServiceProviderProcessor (the processor |
29 # for the @ServiceProvider annotation) and merges them into a single file. | 29 # for the @ServiceProvider annotation) and merges them into a single file. |
30 # Arguments: | 30 # Arguments: |
31 # 1: directory with contents of the JAR file | 31 # 1: directory with contents of the JAR file |
32 define process_providers | 32 define process_providers |
33 $(eval providers=$(1)/$(PROVIDERS_INF)) | 33 $(eval providers := $(1)/$(PROVIDERS_INF)) |
34 $(eval services=$(1)/$(SERVICES_INF)) | 34 $(eval services := $(1)/$(SERVICES_INF)) |
35 $(QUIETLY) test -d $(services) || mkdir -p $(services) | 35 $(QUIETLY) test -d $(services) || mkdir -p $(services) |
36 $(QUIETLY) test ! -d $(providers) || (cd $(providers) && for i in $$(ls); do c=$$(cat $$i); echo $$i >> $(abspath $(services))/$$c; rm $$i; done) | 36 $(QUIETLY) test ! -d $(providers) || (cd $(providers) && for i in $$(ls); do c=$$(cat $$i); echo $$i >> $(abspath $(services))/$$c; rm $$i; done) |
37 | 37 |
38 @# Since all projects are built together with one javac call we cannot determine | 38 @# Since all projects are built together with one javac call we cannot determine |
39 @# which project contains HotSpotVMConfig.inline.hpp so we hardcode it. | 39 @# which project contains HotSpotVMConfig.inline.hpp so we hardcode it. |
40 $(eval vmconfig=$(1)/hotspot/HotSpotVMConfig.inline.hpp) | 40 $(eval vmconfig := $(1)/hotspot/HotSpotVMConfig.inline.hpp) |
41 $(eval vmconfigDest=$(HS_COMMON_SRC)/../jvmci/com.oracle.jvmci.hotspot/src_gen/hotspot) | 41 $(eval vmconfigDest := $(HS_COMMON_SRC)/../jvmci/com.oracle.jvmci.hotspot/src_gen/hotspot) |
42 $(QUIETLY) test ! -f $(vmconfig) || (mkdir -p $(vmconfigDest) && cp $(vmconfig) $(vmconfigDest)) | 42 $(QUIETLY) test ! -f $(vmconfig) || (mkdir -p $(vmconfigDest) && cp $(vmconfig) $(vmconfigDest)) |
43 endef | 43 endef |
44 | 44 |
45 # Reads the files in jvmci.options/ created by OptionProcessor (the processor for the @Option annotation) | 45 # Reads the files in jvmci.options/ created by OptionProcessor (the processor for the @Option annotation) |
46 # and appends to services/com.oracle.jvmci.options.Options entries for the providers | 46 # and appends to services/com.oracle.jvmci.options.Options entries for the providers |
47 # also created by the same processor. | 47 # also created by the same processor. |
48 # Arguments: | 48 # Arguments: |
49 # 1: directory with contents of the JAR file | 49 # 1: directory with contents of the JAR file |
50 define process_options | 50 define process_options |
51 $(eval options=$(1)/$(OPTIONS_INF)) | 51 $(eval options := $(1)/$(OPTIONS_INF)) |
52 $(eval services=$(1)/META-INF/services) | 52 $(eval services := $(1)/META-INF/services) |
53 $(QUIETLY) test -d $(services) || mkdir -p $(services) | 53 $(QUIETLY) test -d $(services) || mkdir -p $(services) |
54 $(QUIETLY) test ! -d $(options) || (cd $(options) && for i in $$(ls); do echo $${i}_Options >> $(abspath $(services))/com.oracle.jvmci.options.Options; done) | 54 $(QUIETLY) test ! -d $(options) || (cd $(options) && for i in $$(ls); do echo $${i}_Options >> $(abspath $(services))/com.oracle.jvmci.options.Options; done) |
55 endef | 55 endef |
56 | 56 |
57 # Extracts META-INF/jvmci.services and META-INF/jvmci.options of a JAR file into a given directory | 57 # Extracts META-INF/jvmci.services and META-INF/jvmci.options of a JAR file into a given directory |
58 # Arguments: | 58 # Arguments: |
59 # 1: JAR file to extract | 59 # 1: JAR file to extract |
60 # 2: target directory | 60 # 2: target directory (which already exists) |
61 define extract | 61 define extract |
62 $(eval TMP := $(shell mktemp -d $(TARGET)/tmp_XXXXX)) | 62 $(eval TMP := $(shell mktemp -d $(TARGET)/tmp_XXXXX)) |
63 $(QUIETLY) mkdir -p $(2) | |
64 $(QUIETLY) cd $(TMP) && $(JAR) xf $(abspath $(1)) && \ | 63 $(QUIETLY) cd $(TMP) && $(JAR) xf $(abspath $(1)) && \ |
65 ((test ! -d .$(SERVICES_INF) || cp -r .$(SERVICES_INF) $(abspath $(2))) && \ | 64 ((test ! -d .$(SERVICES_INF) || cp -r .$(SERVICES_INF) $(abspath $(2))) && \ |
66 (test ! -d .$(OPTIONS_INF) || cp -r .$(OPTIONS_INF) $(abspath $(2)))) | 65 (test ! -d .$(OPTIONS_INF) || cp -r .$(OPTIONS_INF) $(abspath $(2)))); |
67 $(QUIETLY) rm -r $(TMP) | 66 $(QUIETLY) rm -r $(TMP); |
68 $(QUIETLY) cp $(1) $(2) | 67 $(QUIETLY) cp $(1) $(2) |
69 endef | 68 endef |
70 | 69 |
71 # Calls $(JAVAC) with the boot class path $(JDK_BOOTCLASSPATH) and sources taken from the automatic variable $^ | 70 # Calls $(JAVAC) with the boot class path $(JDK_BOOTCLASSPATH) and sources taken from the automatic variable $^ |
72 # Arguments: | 71 # Arguments: |
90 # and that only existing JVMCI services and options are exported. | 89 # and that only existing JVMCI services and options are exported. |
91 # Arguments: | 90 # Arguments: |
92 # 1: list of service or option files | 91 # 1: list of service or option files |
93 # 2: prefix to apply to each file to create match pattern | 92 # 2: prefix to apply to each file to create match pattern |
94 define verify_defs_make | 93 define verify_defs_make |
95 $(eval defs=make/defs.make) | 94 $(eval defs := make/defs.make) |
96 $(eval exports=$(shell grep '$(2)' make/defs.make | sed 's:.*$(2)::g')) | 95 $(eval exports := $(shell grep '$(2)' make/defs.make | sed 's:.*$(2)::g')) |
97 $(foreach file,$(1),$(if $(findstring $(file),$(exports)), ,$(error "Pattern '$(2)$(file)' not found in $(defs)"))) | 96 $(foreach file,$(1),$(if $(findstring $(file),$(exports)), ,$(error "Pattern '$(2)$(file)' not found in $(defs)"))) |
98 $(foreach export,$(exports),$(if $(findstring $(export),$(1)), ,$(error "The line '$(2)$(export)' should not be in $(defs)"))) | 97 $(foreach export,$(exports),$(if $(findstring $(export),$(1)), ,$(error "The line '$(2)$(export)' should not be in $(defs)"))) |
99 endef | 98 endef |
100 | 99 |
101 all: default | 100 all: default |