diff options
author | Alvin Chang <alvinga@andestech.com> | 2023-05-17 00:18:01 +0800 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2023-05-17 11:13:19 +0200 |
commit | 4a1fef87d51621ac00bdebade3ed51f8aaa1a1ca (patch) | |
tree | fbb622d96cb22a41e0001a3e91bc27b516301d9e | |
parent | 44404dcb1899e5ad97aa6d106592b6795a891886 (diff) |
toolchain.mk: Enable shell option "nullglob" when finding target files
Not all toolchains have *-none-linux* format executables. If no file
matches that pattern, the error occurs when the next "ln" command is
executed. Fix it by enabling shell option "nullglob". Therefore, when
there is no file matches that pattern, the pattern will be expanded to
a null string, rather than itself.
Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r-- | toolchain.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toolchain.mk b/toolchain.mk index 658fe19..ec0f512 100644 --- a/toolchain.mk +++ b/toolchain.mk @@ -19,7 +19,7 @@ define dltc tar xf $(TOOLCHAIN_ROOT)/$(3).tar.xz -C $(1) --strip-components=1 || \ { rm $(TOOLCHAIN_ROOT)/$(3).tar.xz; echo Downloaded file is damaged; \ cd $(TOOLCHAIN_ROOT) && rm -rf $(1); exit 1; }; \ - (cd $(1)/bin && for f in *-none-linux*; do ln -s $$f $${f//-none} ; done;) \ + (cd $(1)/bin && shopt -s nullglob && for f in *-none-linux*; do ln -s $$f $${f//-none} ; done;) \ fi endef |