Reduce verbosity of "make testHeaders" - #2467
Conversation
| $(SED) "s%[@]HEADER[@]%${<}%" "$(top_srcdir)/test-suite/testHeader.cc.in" >"$$TargetFileName.cc" && \ | ||
| echo "$(CXXCOMPILE) -c -o" "$$TargetFileName" "$$TargetFileName.cc" && \ | ||
| if test "$(V)" != "0" ; then echo "$(CXXCOMPILE) -c -o" "$$TargetFileName" "$$TargetFileName.cc" ; fi && \ | ||
| if $(CXXCOMPILE) -c -o "$$TargetFileName" "$$TargetFileName.cc" ; \ |
There was a problem hiding this comment.
After we settle on the best silencing method, please apply it to all similar echo command-that-will-run-next cases in .am files (at least). For example:
echo "$(INSTALL_DATA) $(builddir)/$$l/$$page ...I also recommend applying it to other progress-like echo cases. For example:
echo "Located $$l for install..."; ...There was a problem hiding this comment.
I'd prefer to do that in a followup, but sure
There was a problem hiding this comment.
I do not insist on that, but, in my experience, in a PR dedicated to the corresponding improvement, it is usually best to address all eligible cases. That is actually one of the primary values of comprehensive dedicated PRs: Compared to a series of incomplete PRs spread over time, they reduce noise and half-working solution risks while avoiding technical debt creation.
There was a problem hiding this comment.
There is another problem to address then: echo is not portable. We should use $(ECHO) instead.
There was a problem hiding this comment.
and on that line, sed should be $(SED) (for a future PR)
rousskov
left a comment
There was a problem hiding this comment.
Great progress, thank you.
I adjusted PR description to avoid the implication that only .cc files were removed.
| $(SED) "s%[@]HEADER[@]%${<}%" "$(top_srcdir)/test-suite/testHeader.cc.in" >"$$TargetFileName.cc" && \ | ||
| echo "$(CXXCOMPILE) -c -o" "$$TargetFileName" "$$TargetFileName.cc" && \ | ||
| if test "$(V)" != "0" ; then echo "$(CXXCOMPILE) -c -o" "$$TargetFileName" "$$TargetFileName.cc" ; fi && \ | ||
| if $(CXXCOMPILE) -c -o "$$TargetFileName" "$$TargetFileName.cc" ; \ |
There was a problem hiding this comment.
I do not insist on that, but, in my experience, in a PR dedicated to the corresponding improvement, it is usually best to address all eligible cases. That is actually one of the primary values of comprehensive dedicated PRs: Compared to a series of incomplete PRs spread over time, they reduce noise and half-working solution risks while avoiding technical debt creation.
Remove .cc files early from the testing, reducing verbosity. Additionally, only print the compile command if the V variable is non-zero, honoring the same convention used by autotools for all other targets. Error messages, warnings, and other output from the compiler will still be printed to the console.
Autotools provides $(AM_V_at) which expands to either '@' or empty, and $(AM_V_P) which expands to either : or false depending on $(V) levels. Instead of using GNU Make's $(filter), use awk for filtering out non-hdrtest targets
4ab941e to
9b9788b
Compare
In
testHeaderstarget, run recursive "make" only for.hdrtestfiles.Skipping numerous
.cc,.cci,.in, etc. target dependencies removesassociated "Nothing to be done for..." build noise.
Additionally, only print the compile command if the V variable
is non-zero, honoring the same convention used by autotools
for all other targets.
Error messages, warnings, and other output from the compiler
will still be printed to the console.