aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-10 19:19:58 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-10 19:20:03 +0200
commitdeb7ad35e687e1ff0e5578d389c6617d93bef296 (patch)
tree83d5b04f244e18db8917f010b0e818c157c0daf8
parentf5e96ecef5f6e06a06c3dde8796311a5eb8d7f4f (diff)
parentd8b26abed91c421e8517a2c9a60b57d988121b3a (diff)
downloadbitcoin-deb7ad35e687e1ff0e5578d389c6617d93bef296.tar.xz
Merge bitcoin/bitcoin#25813: build: move raw rule into Makefile.am
d8b26abed91c421e8517a2c9a60b57d988121b3a build: move raw rule into Makefile.am (fanquake) Pull request description: The same rule is used by the tests and benchmarks to generate headers, and currently causes #25501. Just deduplicate the code into Makefile.am. Fixes: #25501. ACKs for top commit: hebasto: ACK d8b26abed91c421e8517a2c9a60b57d988121b3a, tested on Ubuntu 22.04, the moved code was verified using `git diff --color-moved=dimmed-zebra HEAD~1..HEAD`. jarolrod: tACK d8b26abed91c421e8517a2c9a60b57d988121b3a Tree-SHA512: 249813318c92f992a89002fb9b96e70fca6ca97b2136ba0a7f5cc312e9abe24fbbe9a8faddb3bc1c0d775ae901bc91eab63ba564810bb2e3b9d56a2b1a107eb1
-rw-r--r--src/Makefile.am9
-rw-r--r--src/Makefile.bench.include9
-rw-r--r--src/Makefile.test.include9
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 $@"