From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 25 Aug 2014 09:58:29 -0600 Subject: [U-Boot] [PATCH v9 08/14] buildman: Allow make-flags variables to include '-' and '_' In-Reply-To: <1408982315-18610-1-git-send-email-sjg@chromium.org> References: <1408982315-18610-1-git-send-email-sjg@chromium.org> Message-ID: <1408982315-18610-9-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de These characters are commonly used in variables, so permit them. Also document the permitted characters. Reported-by: Tom Rini Signed-off-by: Simon Glass --- Changes in v9: - Add new patch to allow make-flags variables to include '-' and '_' Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None tools/buildman/README | 4 +++- tools/buildman/toolchain.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/buildman/README b/tools/buildman/README index d20508f..68465b4 100644 --- a/tools/buildman/README +++ b/tools/buildman/README @@ -670,7 +670,9 @@ snapper9g45=${at91-boards} BUILD_TAG=443 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 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 config.mk file and documented in the README. diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 1b9771f..0e91294 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -198,7 +198,7 @@ class Toolchains: >>> tcs.ResolveReferences(var_dict, 'this=${oblique}_set${first}nd') 'this=OBLIQUE_setfi2ndrstnd' """ - re_var = re.compile('(\$\{[a-z0-9A-Z]{1,}\})') + re_var = re.compile('(\$\{[-_a-z0-9A-Z]{1,}\})') while True: m = re_var.search(args) -- 2.1.0.rc2.206.gedb03e5