chiark / gitweb /
Makefile: introduce MAKEFILE_FIND_X
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 11:10:14 +0000 (11:10 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 11:10:14 +0000 (11:10 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile

index 592f282a44db731fba10aa7f7429ec46f25429ed..96db79d58dc8956d1e8774286d5970e8f98408e3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,11 +20,13 @@ shapelib: templates/shapelib.html stamp/cargo.doc-otter-only
        @echo '  file://$(abspath $(TARGET_DIR)/doc/otter/shapelib_toml/index.html)'
 
 MAKEFILE_DEP ?= Makefile
+MAKEFILE_FIND_X ?=
+# ^ set this to "x" to debug the $rsrcs rune
 
 #---------- funky macros etc. ----------
 
 cr = $(addprefix --,$(filter-out debug,$1))
-rsrcs = $(shell set -x;\
+rsrcs = $(shell $(foreach x,$(MAKEFILE_FIND_X),set -$x;)\
     find -H $1 \( -name Cargo.toml -o -name Cargo.lock -o -name Cargo.lock.example -o -name \*.rs \) \! -path '*/build/*' )
 stamp=@mkdir -p stamp; touch $@