Skip to content

Commit deb7ad3

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25813: build: move raw rule into Makefile.am
d8b26ab 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 d8b26ab, tested on Ubuntu 22.04, the moved code was verified using `git diff --color-moved=dimmed-zebra HEAD~1..HEAD`. jarolrod: tACK d8b26ab Tree-SHA512: 249813318c92f992a89002fb9b96e70fca6ca97b2136ba0a7f5cc312e9abe24fbbe9a8faddb3bc1c0d775ae901bc91eab63ba564810bb2e3b9d56a2b1a107eb1
2 parents f5e96ec + d8b26ab commit deb7ad3

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

src/Makefile.am

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,15 @@ nodist_libbitcoin_ipc_a_SOURCES = $(libbitcoin_ipc_mpgen_output)
10651065
CLEANFILES += $(libbitcoin_ipc_mpgen_output)
10661066
endif
10671067

1068+
%.raw.h: %.raw
1069+
@$(MKDIR_P) $(@D)
1070+
@{ \
1071+
echo "static unsigned const char $(*F)_raw[] = {" && \
1072+
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
1073+
echo "};"; \
1074+
} > "$@.new" && mv -f "$@.new" "$@"
1075+
@echo "Generated $@"
1076+
10681077
include Makefile.minisketch.include
10691078

10701079
include Makefile.crc32c.include

src/Makefile.bench.include

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,3 @@ bench: $(BENCH_BINARY) FORCE
9393

9494
bitcoin_bench_clean : FORCE
9595
rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
96-
97-
%.raw.h: %.raw
98-
@$(MKDIR_P) $(@D)
99-
@{ \
100-
echo "static unsigned const char $(*F)_raw[] = {" && \
101-
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
102-
echo "};"; \
103-
} > "[email protected]" && mv -f "[email protected]" "$@"
104-
@echo "Generated $@"

src/Makefile.test.include

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,3 @@ endif
415415
echo "};};"; \
416416
} > "[email protected]" && mv -f "[email protected]" "$@"
417417
@echo "Generated $@"
418-
419-
%.raw.h: %.raw
420-
@$(MKDIR_P) $(@D)
421-
@{ \
422-
echo "static unsigned const char $(*F)_raw[] = {" && \
423-
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
424-
echo "};"; \
425-
} > "[email protected]" && mv -f "[email protected]" "$@"
426-
@echo "Generated $@"

0 commit comments

Comments
 (0)