depends: disable variables, rules and suffixes. #33045

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:22126_rebased changing 1 files +2 −0
  1. fanquake commented at 3:24 pm on July 23, 2025: member

    This picks up #22126. Previously, this was more complicated to do, as depends packages (upnp, natpmp) used the rules being disabled. Those packages have since been removed.

    When there is no rule to build a target in the makefile, make looks for a builtin rule. When -r is specified make no longer performs this lookup.

    E.g. the following in an excerpt from make -d output. Here, make looks for a rule to build all.

     0Considering target file 'all'.
     1 File 'all' does not exist.
     2 Looking for an implicit rule for 'all'.
     3 Trying pattern rule with stem 'all'.
     4 Trying implicit prerequisite 'all.o'.
     5 Trying pattern rule with stem 'all'.
     6 Trying implicit prerequisite 'all.c'.
     7 Trying pattern rule with stem 'all'.
     8 Trying implicit prerequisite 'all.cc'.
     9 Trying pattern rule with stem 'all'.
    10 Trying implicit prerequisite 'all.C'.
    11 Trying pattern rule with stem 'all'.
    12 Trying implicit prerequisite 'all.cpp'.
    13 Trying pattern rule with stem 'all'.
    14 Trying implicit prerequisite 'all.p'.
    15 Trying pattern rule with stem 'all'.
    16 Trying implicit prerequisite 'all.f'.
    17...
    

    Many more lines like this are omitted.

    Because this build system does not use make builtin rules or suffixes, there is no benefit in having builtin rules enabled.

    There are 2 benefits in having builtin rules disabled.

    1. Improves performance by eliminating redundant lookups.
    2. Simplifies troubleshooting by reducing the output of make -d or make -p.

    Also see: https://www.gnu.org/software/make/manual/make.html#index-_002d_002dno_002dbuiltin_002drules.

  2. DrahtBot added the label Build system on Jul 23, 2025
  3. DrahtBot commented at 3:24 pm on July 23, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33045.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK theuni

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

  4. fanquake added the label DrahtBot Guix build requested on Jul 23, 2025
  5. DrahtBot commented at 11:21 am on July 24, 2025: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 73e754bd01b0653d1fda2d947fcaed0742da81c3(master) commit 21f4a31c8a7f054e85e0e978bdd23c19ca487a69(pull/33045/merge)
    *-aarch64-linux-gnu-debug.tar.gz 66323aae7b9ce287... 913afa27e7edcace...
    *-aarch64-linux-gnu.tar.gz f91f331b0f58ca41... 8e0a47321ef370f2...
    *-arm-linux-gnueabihf-debug.tar.gz 35514683e2c806eb... 3f654c51e8fca816...
    *-arm-linux-gnueabihf.tar.gz 03b34325a162d549... 4f5b75460a1b99bd...
    *-arm64-apple-darwin-codesigning.tar.gz f22f13c2eca5fdfb... e6ce8199724a107b...
    *-arm64-apple-darwin-unsigned.tar.gz 3391effee20ec6af... 34e88ab254c31f2d...
    *-arm64-apple-darwin-unsigned.zip a502fe719ba93cd6... 551be5fd8181cfbf...
    *-powerpc64-linux-gnu-debug.tar.gz 5056cab7e5846f1a... 24eb381acb4a0e21...
    *-powerpc64-linux-gnu.tar.gz 8f2a3dc992ad2528... d58c2be9bbdc0a1e...
    *-riscv64-linux-gnu-debug.tar.gz dff0790128ad3e3b... 8fe4b7b1d494eebd...
    *-riscv64-linux-gnu.tar.gz 36f075d3e82d8118... ca4c95d02bc10b7c...
    *-x86_64-apple-darwin-codesigning.tar.gz f5c98678f07abadb... 29d3165d030c199c...
    *-x86_64-apple-darwin-unsigned.tar.gz 92f3bdbf703a28ba... 01b2a075580bea08...
    *-x86_64-apple-darwin-unsigned.zip 1ce72bf9ece268b9... 253a27b1fb825dd7...
    *-x86_64-linux-gnu-debug.tar.gz 6378973406ab790c... 77c232b9b592bd82...
    *-x86_64-linux-gnu.tar.gz 852bd5993a5e0af6... 4654cfb476133c39...
    *.tar.gz c374850b77d3191b... b677fe2965b77171...
    SHA256SUMS.part bb4156ff76c39233... e89eb8569e44abd8...
    guix_build.log 945c1eaecc45dbdd... f6a192c8fa22676a...
    guix_build.log.diff 61d0d7d432f7f2b2...
  6. DrahtBot removed the label DrahtBot Guix build requested on Jul 24, 2025
  7. fanquake force-pushed on Jul 31, 2025
  8. fanquake requested review from theuni on Aug 1, 2025
  9. fanquake force-pushed on Aug 1, 2025
  10. fanquake force-pushed on Aug 6, 2025
  11. fanquake force-pushed on Aug 13, 2025
  12. fanquake force-pushed on Sep 1, 2025
  13. fanquake force-pushed on Sep 4, 2025
  14. theuni commented at 3:05 pm on September 4, 2025: member

    Concept ACK and utACK 803a2f5e9f869502536560f5bbe5979a137a20e5.

    I was going to suggest:

    • Using --no-builtin-rules rather than -r to be a little more self-documenting
    • Using GNUMAKEFLAGS rather than MAKEFLAGS for better compatibility

    But…

    BSD Make supports -r, so that pretty much moots both points. Also, I’m pretty sure we require GNU Make anyway.

    Only nit: Does anything depend on the builtin variables, or could we use -R as well?

  15. fanquake force-pushed on Sep 5, 2025
  16. fanquake commented at 1:32 pm on September 5, 2025: member

    or could we use -R as well?

    Pushed up a commit.

  17. fanquake renamed this:
    depends: disable builtin rules and suffixes.
    depends: disable variables, rules and suffixes.
    on Sep 5, 2025
  18. fanquake added the label DrahtBot Guix build requested on Sep 5, 2025
  19. DrahtBot commented at 2:22 pm on September 6, 2025: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit e04cb9c1bdf2199127cc8cf9c87f25e46b8cac7b(master) commit 60623acf9db2a4a2f4b5d628a76b03fec22a755c(pull/33045/merge)
    *-aarch64-linux-gnu-debug.tar.gz cd50bfed7e9bc0f8... 87104f63233496ca...
    *-aarch64-linux-gnu.tar.gz 36a02623053223bc... 4dea2f22e2960ba8...
    *-arm-linux-gnueabihf-debug.tar.gz 458c2f80c194deb2... 2547fc07072da046...
    *-arm-linux-gnueabihf.tar.gz b64957c7554150f0... 99bb29541b6a6292...
    *-arm64-apple-darwin-codesigning.tar.gz 60882ae5d893d3a5... 51a056eb204b46f0...
    *-arm64-apple-darwin-unsigned.tar.gz cb0c6481e288a0ac... 2a157c9be42c3c22...
    *-arm64-apple-darwin-unsigned.zip 1368db96c33512d3... 4c4fa278aa1f1b1e...
    *-powerpc64-linux-gnu-debug.tar.gz 364b4bcb42c3fd42... f5208f711bd2d3d7...
    *-powerpc64-linux-gnu.tar.gz c8f45ac13000d807... 7077086ce168746a...
    *-riscv64-linux-gnu-debug.tar.gz 919495916d8c36d9... d39dbafc71c5f423...
    *-riscv64-linux-gnu.tar.gz feb064a4d3f3e9f3... 83148f565a8d9ad1...
    *-x86_64-apple-darwin-codesigning.tar.gz 08bb05b29e5b466a... 3c0fba3b0f6d22d5...
    *-x86_64-apple-darwin-unsigned.tar.gz 968b1f2e17f0eb67... 07162534362b09fd...
    *-x86_64-apple-darwin-unsigned.zip 351e8c1f1df53a31... 3acffe679480c073...
    *-x86_64-linux-gnu-debug.tar.gz d1bfb9b513bb03d6... 61d5dc3bbbbc511c...
    *-x86_64-linux-gnu.tar.gz 504457dd348fe70d... ce70220960f8da3c...
    *.tar.gz 6944fc8c6b7504b6... 73e9ba02c5d91050...
    SHA256SUMS.part 077beb6922793d39... 8ead66dfe9edef6c...
    guix_build.log bea83b2d9bf46459... 29725b817fc58608...
    guix_build.log.diff 1d72d106a748a136...
  20. DrahtBot removed the label DrahtBot Guix build requested on Sep 6, 2025
  21. fanquake force-pushed on Sep 16, 2025
  22. depends: disable builtin rules and suffixes.
    When there is no rule to build a target in the makefile, make looks
    for a builtin rule.
    When -r is specified make no longer performs this lookup.
    
    E.g. the following in an excerpt from make -d output.
    Here, make looks for a rule to build 'all'.
    
    Considering target file 'all'.
     File 'all' does not exist.
     Looking for an implicit rule for 'all'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.o'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.c'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.cc'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.C'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.cpp'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.p'.
     Trying pattern rule with stem 'all'.
     Trying implicit prerequisite 'all.f'.
    ...
    Many more lines like this are omitted.
    
    Because this build system does not use make builtin rules or suffixes,
    there is no benefit in having builtin rules enabled.
    
    There are 2 benefits in having builtin rules disabled.
    
    1. Improves performance by eliminating redundant lookups.
    2. Simplifies troubleshooting by reducing the output of make -d or
    make -p.
    a0b7858b43
  23. depends: disable builtin variables 7e72e9b146
  24. fanquake force-pushed on Oct 10, 2025

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: 2025-10-10 15:13 UTC

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