shellcheck: Fix shellcheck target with out of tree build
Prepend source directory to script names, and include source directory
in shellcheck search path.
Fixes: ddfdcc3929aef ("Add initial shellcheck checking")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240503052510.968229-2-npiggin@gmail.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/Makefile b/Makefile
index 6240d8d..b0f7ad0 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,7 @@
.PHONY: shellcheck
shellcheck:
- shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh
+ shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh
.PHONY: tags
tags: