Skip to content

Commit 541012e

Browse files
committed
Build: Use AM_V_GEN in Makefiles where appropriate
When generating new files as part of the Makefile the recipe is sometimes suppressed with $(AM_V_GEN) and sometimes with `@`. We should prefer $(AM_V_GEN), since this also prints the lines in silent mode. This is arguably more in style with the current recipe echoing. Before: Generated test/data/script_tests.json.h Now: GEN test/data/script_tests.json.h A side effect of this change is that the recipe for generating build.h is now echoed on each make run. Arguably this makes its generation more transparent.
1 parent e2ae5c3 commit 541012e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Makefile.am

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ BITCOIN_CORE_H = \
346346

347347
obj/build.h: FORCE
348348
@$(MKDIR_P) $(builddir)/obj
349-
@$(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \
349+
$(AM_V_GEN) $(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \
350350
"$(abs_top_srcdir)"
351351
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
352352

@@ -1085,12 +1085,11 @@ endif
10851085

10861086
%.raw.h: %.raw
10871087
@$(MKDIR_P) $(@D)
1088-
@{ \
1088+
$(AM_V_GEN) { \
10891089
echo "static unsigned const char $(*F)_raw[] = {" && \
10901090
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
10911091
echo "};"; \
10921092
} > "$@.new" && mv -f "$@.new" "$@"
1093-
@echo "Generated $@"
10941093

10951094
include Makefile.minisketch.include
10961095

src/Makefile.test.include

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,9 @@ endif
414414

415415
%.json.h: %.json
416416
@$(MKDIR_P) $(@D)
417-
@{ \
417+
$(AM_V_GEN) { \
418418
echo "namespace json_tests{" && \
419419
echo "static unsigned const char $(*F)[] = {" && \
420420
$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
421421
echo "};};"; \
422422
} > "[email protected]" && mv -f "[email protected]" "$@"
423-
@echo "Generated $@"

0 commit comments

Comments
 (0)