chiark / gitweb /
Add-hoc rule for binaries (which does not depend on stamp files)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 12 Jan 2021 21:17:04 +0000 (21:17 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 12 Jan 2021 21:24:38 +0000 (21:24 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile

index ec047addff25cd7a0874a362872fd92b732e7205..ed516434be073bba1b8665d49c19ec41e1aef03d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -154,6 +154,9 @@ stamp/cargo.%: $(call rsrcs,. ! -path './wasm/*')
        $(CARGO) build $(call cr,$*) -p otter -p otter-daemon
        $(stamp)
 
+$(TARGET_DIR)/debug/%: $(call rsrcs, ! -path './wasm/*')
+       $(CARGO) build -p otter --bin $*
+
 stamp/cargo.check: $(call rsrcs,.)
        $(CARGO) test --workspace
        $(stamp)
@@ -269,9 +272,8 @@ $(addprefix templates/,$(TXTFILES)): templates/%: %.txt
 
 libraries: $(LIBRARY_FILES)
 
-templates/shapelib.html: stamp/cargo.debug $(LIBRARY_FILES)
-       $(NAILING_CARGO) --just-run --- \
-               $(abspath $(TARGET_DIR))/debug/otterlib \
+templates/shapelib.html: $(TARGET_DIR)/debug/otterlib $(LIBRARY_FILES)
+       $(NAILING_CARGO) --just-run --- $(abspath $<) \
        --libs '$(addprefix $(PWD)/, $(addsuffix .toml, $(LIBRARIES)))' \
                preview >$@.tmp && mv -f $@.tmp $@