comparison make/jvmci.make @ 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
84 $(QUIETLY) mkdir -p $(shell dirname $(4)) 84 $(QUIETLY) mkdir -p $(shell dirname $(4))
85 $(QUIETLY) $(JAR) cf $(4) -C $(TMP) . 85 $(QUIETLY) $(JAR) cf $(4) -C $(TMP) .
86 $(QUIETLY) rm -r $(TMP) 86 $(QUIETLY) rm -r $(TMP)
87 endef 87 endef
88 88
89 # Verifies that make/defs.make contains a line for each file in a list of files. 89 # Verifies that make/defs.make contains an appropriate line for each JVMCI service or option
90 # and that only existing JVMCI services and options are exported.
90 # Arguments: 91 # Arguments:
91 # 1: list of files 92 # 1: list of service or option files
92 # 2: prefix to apply to each file to create match pattern 93 # 2: prefix to apply to each file to create match pattern
93 define verify_defs_make 94 define verify_defs_make
94 $(eval defs=make/defs.make) 95 $(eval defs=make/defs.make)
95 $(foreach file,$(1),$(if $(shell grep '$(2)$(file)' $(defs) > /dev/null && echo found), , $(error "Pattern '$(2)$(file)' not found in $(defs)"))) 96 $(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)")))
98 $(foreach export,$(exports),$(if $(findstring $(export),$(1)), ,$(error "The line '$(2)$(export)' should not be in $(defs)")))
96 endef 99 endef
97 100
98 all: default 101 all: default
99 102
100 export: all 103 export: all