build: Add variable printing target to Makefiles #17087

pull dongcarl wants to merge 1 commits into bitcoin:master from dongcarl:2019-10-one-weird-makefile-trick changing 2 files +8 −0
  1. dongcarl commented at 3:15 PM on October 9, 2019: member
    I kept finding myself needing these to debug our build system, since
    they are innocuous and are very helpful they probably belong in the
    codebase.
    
    Source: John Graham-Cumming
    https://www.cmcrossroads.com/article/printing-value-makefile-variable
    
  2. build: Add variable printing target to Makefiles
    I kept finding myself needing these to debug our build system, since
    they are innocuous and are very helpful they probably belong in the
    codebase.
    
    Source: John Graham-Cumming
    https://www.cmcrossroads.com/article/printing-value-makefile-variable
    181989f6c9
  3. dongcarl added the label Build system on Oct 9, 2019
  4. hebasto commented at 4:32 PM on October 9, 2019: member

    The whole OP seems like a block of code ;)

  5. dongcarl commented at 4:38 PM on October 9, 2019: member

    The whole OP seems like a block of code ;)

    How else would I get people to recognize that I follow line length limits in my commit messages! :grin:

  6. MarcoFalke commented at 4:43 PM on October 9, 2019: member

    I read those as a quote and it takes me a minute to figure out who is meant with I

  7. MarcoFalke commented at 6:08 PM on October 9, 2019: member

    ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2

    $ git checkout 181989f6c9427fc266dbdcc84cb60ac03e67cdb2~1 && make print-top_srcdir
    HEAD is now at 1c11e53bb6 Merge [#17041](/bitcoin-bitcoin/17041/): ci: Run tests on arm
    make: *** No rule to make target 'print-top_srcdir'.  Stop.
    
    $ git checkout 181989f6c9427fc266dbdcc84cb60ac03e67cdb2~0 && make print-top_srcdir
    Previous HEAD position was 1c11e53bb6 Merge [#17041](/bitcoin-bitcoin/17041/): ci: Run tests on arm
    HEAD is now at 181989f6c9 build: Add variable printing target to Makefiles
     cd . && /bin/sh /home/marco/workspace/btc_bitcoin_core/build-aux/missing automake-1.16 --foreign Makefile
     cd . && /bin/sh ./config.status Makefile 
    config.status: creating Makefile
    top_srcdir = .
    

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2
    
    

    $ git checkout 181989f6c9427fc266dbdcc84cb60ac03e67cdb2~1 && make print-top_srcdir HEAD is now at 1c11e53bb6 Merge #17041: ci: Run tests on arm make: *** No rule to make target 'print-top_srcdir'. Stop.

    $ git checkout 181989f6c9427fc266dbdcc84cb60ac03e67cdb2~0 && make print-top_srcdir Previous HEAD position was 1c11e53bb6 Merge #17041: ci: Run tests on arm HEAD is now at 181989f6c9 build: Add variable printing target to Makefiles cd . && /bin/sh /home/marco/workspace/btc_bitcoin_core/build-aux/missing automake-1.16 --foreign Makefile cd . && /bin/sh ./config.status Makefile config.status: creating Makefile top_srcdir = .

    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUjbZAv9GLi1F7QT0omMC06pb7F8RfmSuEWrQVpv3wGTJe4HrxDQlI+chsVSLLWO
    kBGDWRD9VywD+7b4R6SCHT/MgJMsWZlI66X0aTa2G4Wjf003jND4yJlQ+x2CVHCW
    jRf05y5h+v272JZKvNu50kBSwMaBjqkkvswCn/Wc7RX1iIkqdXsy13Zx/0VITlPM
    Eb+XbxHX/y5Aq0fDMWdwEfpqypRIe6N07PtOHxBqomC1LQaMLwCSzW43aahtxKwu
    4kTOz3C4iG2a1zi21YCSQpqcO/BVjlkjg1koZIvP2JAeFktH4bWhWo5PWmXGks5q
    Fghsnpl0emptAqKsdDVEonHXqkeRHL4Dxv02IEfT7a5aTa3ojaQfRliMOrf2Ezhc
    4WPI8gqLY7R5vA+EGUsnTH2qEB83YiKt0j8515vgVpcWYTa1X/sOMSD2hZjFhFqb
    Eldvoe4c9SY8jviGh5//RagOjZzqME2VQZzphJ2lF0sswV0R8CUXX6o3FUcCK33n
    izMlpSrD
    =U+Sb
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash ceb9bcc607d08509cccb7193e0e0e4f3df49f218ec4d143d4f5fd1bc4b08f8a1 -

    </details>

  8. promag commented at 8:41 PM on October 9, 2019: member

    ACK, nice one!

  9. fanquake approved
  10. fanquake commented at 9:43 PM on October 9, 2019: member

    ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2 - concise amount of useful code. Tested on macOS. Did not visit the link.

    $ make print-BITCOIND_BIN
    BITCOIND_BIN = ./src/bitcoind
    $ make -C depends/ print-SOURCES_PATH
    SOURCES_PATH = /Users/michael/github/bitcoin/depends/sources
    
  11. fanquake referenced this in commit bc7e721d97 on Oct 9, 2019
  12. fanquake merged this on Oct 9, 2019
  13. fanquake closed this on Oct 9, 2019

  14. deadalnix referenced this in commit 03a481b380 on Apr 3, 2020
  15. MarkLTZ referenced this in commit 3b69b903d9 on Apr 6, 2020
  16. ftrader referenced this in commit feabdecacd on Aug 17, 2020
  17. zkbot referenced this in commit a0158ce837 on Jan 15, 2021
  18. MarcoFalke locked this on Jan 16, 2021
  19. fanquake deleted a comment on Jan 16, 2021
  20. fanquake deleted a comment on Jan 16, 2021

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: 2026-05-01 03:15 UTC

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