From 7a66a773ee262e28e0acdcce85a0f950832fc92e Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 26 Jun 2025 13:57:45 +0200 Subject: fix shell redirects in makefiles writing empty files on error; fixes #340 --- data/makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'data') diff --git a/data/makefile b/data/makefile index fe4ab583..9b4dec4e 100644 --- a/data/makefile +++ b/data/makefile @@ -29,15 +29,15 @@ book.json: ../book/book.json recipes/none.yaml: echo > $@ recipes/anticurry.yaml: recipes/default.yaml - recipes/anticurry.sed <$<>$@ + recipes/anticurry.sed < $< > $@~ && cp $@~ $@ recipes/default.yaml: recipes/default.js - DENO_NO_UPDATE_CHECK=1 $(JSR) $< > $@ + DENO_NO_UPDATE_CHECK=1 $(JSR) $< > $@~ && cp $@~ $@ recipes/%.gv.txt: recipes/%.yaml - { cd .. && cargo $(CARGOFLAGS) run --release --bin graph $(patsubst recipes/%.yaml,%,$<); } > $@ + { cd .. && cargo $(CARGOFLAGS) run --release --bin graph $(patsubst recipes/%.yaml,%,$<); } > $@~ && cp $@~ $@ recipes/%.svg: recipes/%.gv.txt - dot -Tsvg -Kdot >$@<$< + dot -Tsvg -Kdot < $< > $@~ && cp $@~ $@ clean: $(RM) $(ALL) -- cgit v1.2.3-70-g09d2