mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-15 00:59:38 +02:00
bench: Move generated data to a dedicated translation unit
This commit is contained in:
@@ -18,6 +18,8 @@ bench_bench_bitcoin_SOURCES = \
|
||||
bench/block_assemble.cpp \
|
||||
bench/checkblock.cpp \
|
||||
bench/checkqueue.cpp \
|
||||
bench/data.h \
|
||||
bench/data.cpp \
|
||||
bench/duplicate_inputs.cpp \
|
||||
bench/examples.cpp \
|
||||
bench/rollingbloom.cpp \
|
||||
@@ -76,7 +78,7 @@ CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_BENCH_FILES)
|
||||
|
||||
CLEANFILES += $(CLEAN_BITCOIN_BENCH)
|
||||
|
||||
bench/checkblock.cpp: bench/data/block413567.raw.h
|
||||
bench/data.cpp: bench/data/block413567.raw.h
|
||||
|
||||
bitcoin_bench: $(BENCH_BINARY)
|
||||
|
||||
@@ -89,7 +91,7 @@ bitcoin_bench_clean : FORCE
|
||||
%.raw.h: %.raw
|
||||
@$(MKDIR_P) $(@D)
|
||||
@{ \
|
||||
echo "static unsigned const char $(*F)[] = {" && \
|
||||
echo "static unsigned const char $(*F)_raw[] = {" && \
|
||||
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
|
||||
echo "};"; \
|
||||
} > "$@.new" && mv -f "$@.new" "$@"
|
||||
|
||||
Reference in New Issue
Block a user