buildman: Allow make-flags variables to include '-' and '_'

These characters are commonly used in variables, so permit them. Also
document the permitted characters.

Reported-by: Tom Rini <trini@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2014-08-28 09:43:40 -06:00
parent 2c3deb9758
commit f60c9d4f39
2 changed files with 4 additions and 2 deletions

View file

@ -670,7 +670,9 @@ snapper9g45=${at91-boards} BUILD_TAG=443
This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260 This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260
and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special
variable ${target} is available to access the target name (snapper9260 and variable ${target} is available to access the target name (snapper9260 and
snapper9g20 in this case). Variables are resolved recursively. snapper9g20 in this case). Variables are resolved recursively. Note that
variables can only contain the characters A-Z, a-z, 0-9, hyphen (-) and
underscore (_).
It is expected that any variables added are dealt with in U-Boot's It is expected that any variables added are dealt with in U-Boot's
config.mk file and documented in the README. config.mk file and documented in the README.

View file

@ -198,7 +198,7 @@ class Toolchains:
>>> tcs.ResolveReferences(var_dict, 'this=${oblique}_set${first}nd') >>> tcs.ResolveReferences(var_dict, 'this=${oblique}_set${first}nd')
'this=OBLIQUE_setfi2ndrstnd' 'this=OBLIQUE_setfi2ndrstnd'
""" """
re_var = re.compile('(\$\{[a-z0-9A-Z]{1,}\})') re_var = re.compile('(\$\{[-_a-z0-9A-Z]{1,}\})')
while True: while True:
m = re_var.search(args) m = re_var.search(args)