mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
build: move raw rule into Makefile.am
The same rule is used by the tests and benchmarks to generate headers, and currently causes #25501. Just deduplicate the code into Makefile.am.
This commit is contained in:
parent
ac59112a6a
commit
d8b26abed9
3 changed files with 9 additions and 18 deletions
|
@ -1065,6 +1065,15 @@ nodist_libbitcoin_ipc_a_SOURCES = $(libbitcoin_ipc_mpgen_output)
|
|||
CLEANFILES += $(libbitcoin_ipc_mpgen_output)
|
||||
endif
|
||||
|
||||
%.raw.h: %.raw
|
||||
@$(MKDIR_P) $(@D)
|
||||
@{ \
|
||||
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" "$@"
|
||||
@echo "Generated $@"
|
||||
|
||||
include Makefile.minisketch.include
|
||||
|
||||
include Makefile.crc32c.include
|
||||
|
|
|
@ -93,12 +93,3 @@ 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)_raw[] = {" && \
|
||||
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
|
||||
echo "};"; \
|
||||
} > "$@.new" && mv -f "$@.new" "$@"
|
||||
@echo "Generated $@"
|
||||
|
|
|
@ -415,12 +415,3 @@ endif
|
|||
echo "};};"; \
|
||||
} > "$@.new" && mv -f "$@.new" "$@"
|
||||
@echo "Generated $@"
|
||||
|
||||
%.raw.h: %.raw
|
||||
@$(MKDIR_P) $(@D)
|
||||
@{ \
|
||||
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" "$@"
|
||||
@echo "Generated $@"
|
||||
|
|
Loading…
Add table
Reference in a new issue