build-sys: fix find-in-path
PATCH 1/1 build-sys: fix find-in-path
Fix spelling, the GNU make text functions is not called "find-string" but "findstring".
--- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rules.mak +1 -1
@@ -132,7 +132,7 @@ endef # Looks in the PATH if the argument contains no slash, else only considers one # specific directory. Returns an # empty string if the program doesn't exist # there. -find-in-path = $(if $(find-string /, $1), \ +find-in-path = $(if $(findstring /, $1), \ $(wildcard $1), \ $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
Signature · 1 line
2.10.0
Quoted 13 lines · Marc-André Lureau
Fix spelling, the GNU make text functions is not called "find-string" but "findstring".
Signed-off-by Marc-André Lureau <[email protected]>--- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rules.mak +0
-0
rules.mak endef · line 137
Quoted 7 lines
rules.mak +1
-1@@ -132,7 +132,7 @@ endef # Looks in the PATH if the argument contains no slash, else only considers one # specific directory. Returns an # empty string if the program doesn't exist # there. -find-in-path = $(if $(find-string /, $1), \ +find-in-path = $(if $(findstring /, $1), \ $(wildcard $1), \ $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
Impact?
Hi
----- Original Message -----
Quoted 10 lines
Quoted 8 lines · Marc-André Lureau
Fix spelling, the GNU make text functions is not called "find-string" but "findstring".
Signed-off-by Marc-André Lureau <[email protected]>--- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 13 lines
rules.mak +1
-1@@ -132,7 +132,7 @@ endef # Looks in the PATH if the argument contains no slash, else only considers one # specific directory. Returns an # empty string if the program doesn't exist # there. -find-in-path = $(if $(find-string /, $1), \ +find-in-path = $(if $(findstring /, $1), \ $(wildcard $1), \Quoted 1 line
$(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))Impact?
Not much in current code base, it's only used by:
tests/tcg/Makefile:ifneq ($(call find-in-path, $(CC_I386)),)
So if you set CC_I386 to an absolute PATH, it's not going to run the I386_TESTS.
This is not very important yet, but better for correctness.
In the future, I hope qemu can have a better tcg-test framework (I am doing some experiment in https://github.com/elmarco/qemu/tree/tcg-tests/tests/tcg), and as part of this work, I found this bug.
Markus Armbruster
Reviewed-byQuoted 30 lines · Marc-André Lureau
Hi
----- Original Message -----
Quoted 10 lines
Quoted 8 lines · Marc-André Lureau
Fix spelling, the GNU make text functions is not called "find-string" but "findstring".
Signed-off-by Marc-André Lureau <[email protected]>--- rules.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
Quoted 13 lines
rules.mak +1
-1@@ -132,7 +132,7 @@ endef # Looks in the PATH if the argument contains no slash, else only considers one # specific directory. Returns an # empty string if the program doesn't exist # there. -find-in-path = $(if $(find-string /, $1), \ +find-in-path = $(if $(findstring /, $1), \ $(wildcard $1), \Quoted 1 line
$(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))Impact?
Quoted 8 lines
Not much in current code base, it's only used by:
tests/tcg/Makefile:ifneq ($(call find-in-path, $(CC_I386)),)So if you set
CC_I386to an absolute PATH, it's not going to run theI386_TESTS.This is not very important yet, but better for correctness.
In the future, I hope qemu can have a better tcg-test framework (I am doing some experiment in https://github.com/elmarco/qemu/tree/tcg-tests/tests/tcg), and as part of this work, I found this bug.
Thanks. Suggest to amend the commit message with:
Broken in commit 2b2e59e. Fairly harmless: its only use is in tests/tcg/Makefile, where the bug can cause the I386_TESTS not to run when they should.
With this or something similar, you may add
Michael Tokarev
AppliedApplied to trivial, with additional commit comment suggested by Marcus, thanks!
/mjt