@echo ' file://$(PWD)/$<'
@echo ' file://$(abspath $(TARGET_DIR)/doc/otter/shapelib_toml/index.html)'
+MAKEFILE_DEP ?= Makefile
+
#---------- funky macros etc. ----------
cr = $(addprefix --,$(filter-out debug,$1))
$(addprefix $(TARGET_BUNDLED)/, $(BUNDLED_SOURCES_LIT)): $(TARGET_BUNDLED)/%: %
$(NAILING_CARGO_JUST_RUN) cp $(abspath $(src))/$< $(abspath $@)
-$(TARGET_BUNDLED)/index.html: bundled-sources-make-index Makefile
+$(TARGET_BUNDLED)/index.html: bundled-sources-make-index $(MAKEFILE_DEP)
$(NAILING_CARGO_JUST_RUN) sh -ec ' \
cd $(abspath $(src)); mkdir -p $(dir $@); \
./$< >$@.tmp $(BUNDLED_SOURCES_LINKS); \
USVG_PROCESSOR = usvg-processor
LIBRARY_PROCESS_SVG = ./$(USVG_PROCESSOR) $@ $(wordlist 1,2,$^) '$(USVG_CMD) $(USVG_OPTIONS)'
-$(LIBRARY_FILES): $(USVG_PROCESSOR) $(USVG_BINARY) Makefile
+$(LIBRARY_FILES): $(USVG_PROCESSOR) $(USVG_BINARY) $(MAKEFILE_DEP)
# actual command for each of $(LIBRARY_FILES) is in one of the files.make
# @echo 'nodejs check $< ok'
templates/otter_wasm.ns.d.ts: $(WASM_PACKED)/otter_wasm.d.ts \
- stamp/wasm-pack Makefile
+ stamp/wasm-pack $(MAKEFILE_DEP)
set -e; exec >$@.tmp; \
echo 'declare namespace wasm_bindgen {'; \
sed 's/^export default function init/export function init/' <$<; \
$cfp ="\$@.$ci.tmp";
print $makefile <<END or die $!;
LIBRARY_CLEAN += $ncoloured
-$ncoloured: $lupstream Makefile $makepath
+$ncoloured: $lupstream \$(MAKEFILE_DEP) $makepath
\$(USVG_CMD) -c - <\$< >$cfp
END
}