Bugfix: Correctly replace generated headers and fail cleanly
b74ff5cf0c
This commit is contained in:
@@ -55,3 +55,12 @@ bench: $(BENCH_BINARY) FORCE
|
||||
|
||||
bitcoin_bench_clean : FORCE
|
||||
rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
|
||||
|
||||
%.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 "};"; \
|
||||
} > "$@.new" && mv -f "$@.new" "$@"
|
||||
@echo "Generated $@"
|
||||
|
||||
Reference in New Issue
Block a user