Build: Improve handling of suppressed logging in Makefiles #27041

pull TheCharlatan wants to merge 2 commits into bitcoin:master from TheCharlatan:2023-02-make-log-test-f changing 3 files +8 −10
  1. TheCharlatan commented at 9:34 pm on February 3, 2023: contributor

    This PR triages some behavior around Makefile recipe echoing suppression.

    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.

    Sometimes the error emitted by test -f is currently thrown without any logging. This makes it a bit harder to debug. Instead, print a helpful log message to point the developer in the right direction.

    Alternatively this could have been implemented by just removing the recipe echo suppression (@), but the subsequent make output became too noisy.

  2. 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.
    541012e621
  3. Build: Log when test -f fails in Makefile
    Silently emitting an error makes it a bit harder to debug. Instead,
    print a helpful log message to point the developer in the right
    direction.
    
    Alternatively this could have been implemented by just removing the
    recipe echo suppression (@), but the subsequent make output became too
    noisy.
    1b1ffbd014
  4. DrahtBot commented at 9:34 pm on February 3, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. DrahtBot added the label Build system on Feb 3, 2023
  6. fanquake requested review from theuni on Feb 5, 2023
  7. fanquake approved
  8. fanquake commented at 9:55 am on May 16, 2023: member
    ACK 1b1ffbd014b931afb9435ec10911b9a7c130d3e5
  9. fanquake merged this on May 16, 2023
  10. fanquake closed this on May 16, 2023

  11. sidhujag referenced this in commit d3c80dc412 on May 17, 2023
  12. bitcoin locked this on May 15, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me