aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.bench.include
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-11-12 07:15:02 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-11-12 07:16:28 +0000
commitb74ff5cf0c902b993a759f9ac92d95e186397662 (patch)
tree01ce828f0ceee38f34a61f722f5ea17ddf3692ff /src/Makefile.bench.include
parentb2e178a2d2e387b147f0d87e64fc773d5ec799d0 (diff)
downloadbitcoin-b74ff5cf0c902b993a759f9ac92d95e186397662.tar.xz
Bugfix: Correctly replace generated headers and fail cleanly
Also removes generation of headers for *.raw files in test_bitcoin (none exist anymore)
Diffstat (limited to 'src/Makefile.bench.include')
-rw-r--r--src/Makefile.bench.include8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include
index 840d33c1b5..246797a1b2 100644
--- a/src/Makefile.bench.include
+++ b/src/Makefile.bench.include
@@ -67,7 +67,9 @@ bitcoin_bench_clean : FORCE
%.raw.h: %.raw
@$(MKDIR_P) $(@D)
- @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
- @echo "};" >> $@
+ @{ \
+ echo "static unsigned const char $(*F)[] = {" && \
+ $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
+ echo "};"; \
+ } > "$@.new" && mv -f "$@.new" "$@"
@echo "Generated $@"