diff options
author | fanquake <fanquake@gmail.com> | 2022-08-10 13:36:33 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-08-10 13:36:33 +0100 |
commit | d8b26abed91c421e8517a2c9a60b57d988121b3a (patch) | |
tree | 2cee8c6d367c7704bc40b4fdb90a6e6cbf3b14c8 /src | |
parent | ac59112a6a093e641ce2803260dd9de97b1cd961 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 9 | ||||
-rw-r--r-- | src/Makefile.bench.include | 9 | ||||
-rw-r--r-- | src/Makefile.test.include | 9 |
3 files changed, 9 insertions, 18 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 576a448a0d..18c6c25b96 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index 532f668668..c5705a8be3 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.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 $@" diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 9ed5731af1..7bec94cce1 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -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 $@" |