Mercurial > hg > graal-compiler
comparison mx/mx_graal_makefile.py @ 21939:eac31af360db
verify that only existing JVMCI services and options are exported in make/defs.make
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 12 Jun 2015 13:04:35 +0200 |
parents | 95956bc1b1a3 |
children | 31be1c8f4905 |
comparison
equal
deleted
inserted
replaced
21938:95956bc1b1a3 | 21939:eac31af360db |
---|---|
244 $(QUIETLY) mkdir -p $(shell dirname $(4)) | 244 $(QUIETLY) mkdir -p $(shell dirname $(4)) |
245 $(QUIETLY) $(JAR) cf $(4) -C $(TMP) . | 245 $(QUIETLY) $(JAR) cf $(4) -C $(TMP) . |
246 $(QUIETLY) rm -r $(TMP) | 246 $(QUIETLY) rm -r $(TMP) |
247 endef | 247 endef |
248 | 248 |
249 # Verifies that make/defs.make contains a line for each file in a list of files. | 249 # Verifies that make/defs.make contains an appropriate line for each JVMCI service or option |
250 # Arguments: | 250 # and that only existing JVMCI services and options are exported. |
251 # 1: list of files | 251 # Arguments: |
252 # 1: list of service or option files | |
252 # 2: prefix to apply to each file to create match pattern | 253 # 2: prefix to apply to each file to create match pattern |
253 define verify_defs_make | 254 define verify_defs_make |
254 $(eval defs=make/defs.make) | 255 $(eval defs=make/defs.make) |
255 $(foreach file,$(1),$(if $(shell grep '$(2)$(file)' $(defs) > /dev/null && echo found), , $(error "Pattern '$(2)$(file)' not found in $(defs)"))) | 256 $(eval exports=$(shell grep '$(2)' make/defs.make | sed 's:.*$(2)::g')) |
257 $(foreach file,$(1),$(if $(findstring $(file),$(exports)), ,$(error "Pattern '$(2)$(file)' not found in $(defs)"))) | |
258 $(foreach export,$(exports),$(if $(findstring $(export),$(1)), ,$(error "The line '$(2)$(export)' should not be in $(defs)"))) | |
256 endef | 259 endef |
257 | 260 |
258 all: default | 261 all: default |
259 | 262 |
260 export: all | 263 export: all |