[LTP] [PATCH] Makefile: Fix module dirs search
Martin Doucha
mdoucha@suse.cz
Tue Aug 19 17:49:52 CEST 2025
Module dirs search runs relative to current working directory instead
of the source directory. In an out-of-tree build, the search for makefiles
will come up empty and grep will try to read from standard input, blocking
indefinitely. Search for makefiles relative to the source directory to fix
the issue.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 77270bc7c..7f0ba5e86 100644
--- a/Makefile
+++ b/Makefile
@@ -213,7 +213,7 @@ test-metadata: metadata-all
$(MAKE) -C $(abs_srcdir)/metadata test
MODULE_DIRS := $(shell \
- dirname $$(grep -l 'include.*module\.mk' $$(find testcases/ -type f -name 'Makefile')))
+ dirname $$(grep -l 'include.*module\.mk' $$(find $(abs_srcdir)/testcases/ -type f -name 'Makefile')))
.PHONY: modules modules-clean modules-install
--
2.50.1
More information about the ltp
mailing list