Add CMake build directory patterns to `.gitignore` #1775

pull hebasto wants to merge 2 commits into bitcoin-core:master from hebasto:251118-ignore-build changing 5 files +9 −20
  1. hebasto commented at 10:27 AM on November 18, 2025: member

    Whenever I work on changes that require comparison, such as benchmarking, I end up with two or more build directories that provide different binary variants simultaneously. Adding these build directories to .gitignore makes the workflow a bit easier.

    Additionally, a trivial refactoring is included to reduce the code.

  2. in .gitignore:56 in 90b3339481 outdated
      67 |  ### CMake
      68 |  /CMakeUserPresets.json
      69 | -# Default CMake build directory.
      70 | -/build
      71 | +# CMake build directories.
      72 | +/*build*
    


    hebasto commented at 10:28 AM on November 18, 2025:

    The same pattern is used in Bitcoin Core.

  3. real-or-random commented at 10:36 AM on November 18, 2025: contributor

    Concept ACK

    We could also get rid of build-aux entirely by moving the contents of the only file into configure.ac. I think that would be nice. build-aux can be confusing to people familiar only with CMake, and it hinders tab-completion with CMake dirs etc... What do you think?

  4. real-or-random added the label build on Nov 18, 2025
  5. real-or-random added the label tweak/refactor on Nov 18, 2025
  6. hebasto commented at 1:28 PM on November 18, 2025: member

    We could also get rid of build-aux entirely by moving the contents of the only file into configure.ac. I think that would be nice.

    I think the main purpose of:https://github.com/bitcoin-core/secp256k1/blob/b6c2a3cd7752085d46434921238401766c964c01/configure.ac#L22 is to keep the top level of the repo uncluttered. Without it, it would end up filled as follows:

    $ ./autogen.sh | grep -v libtoolize
    configure.ac:38: installing './ar-lib'
    configure.ac:36: installing './compile'
    configure.ac:23: installing './config.guess'
    configure.ac:23: installing './config.sub'
    configure.ac:26: installing './install-sh'
    configure.ac:26: installing './missing'
    Makefile.am: installing './depcomp'
    parallel-tests: installing './test-driver'
    

    build-aux can be confusing to people familiar only with CMake, and it hinders tab-completion with CMake dirs etc... What do you think?

    The build-aux directory could be renamed. Perhaps to something like autotools-aux?

  7. real-or-random commented at 7:43 PM on November 19, 2025: contributor

    Oh sure! Even I forgot the main purpose of the directory.

    The build-aux directory could be renamed. Perhaps to something like autotools-aux?

    I like that suggestion.

  8. autotools: Rename `build-aux` to `autotools-aux`
    This change improves separation from CMake build directories, which
    typically use the "build" prefix.
    
    Additionally, corresponding `.gitignore` entries have been refactored.
    7eb86bdb01
  9. Add CMake build directory patterns to `.gitignore` 748c0fdd67
  10. hebasto force-pushed on Nov 20, 2025
  11. hebasto commented at 12:44 PM on November 20, 2025: member

    The build-aux directory could be renamed. Perhaps to something like autotools-aux?

    I like that suggestion.

    Thanks! Done.

  12. real-or-random approved
  13. real-or-random commented at 4:22 PM on November 27, 2025: contributor

    utACK 748c0fdd67c646c83bd62e74a8e205e04d314e07

  14. furszy commented at 6:18 PM on January 27, 2026: member

    ACK 748c0fdd67c646c83bd62e74a8e205e04d314e07

  15. real-or-random merged this on Jan 28, 2026
  16. real-or-random closed this on Jan 28, 2026

  17. hebasto deleted the branch on Jan 28, 2026
  18. fanquake referenced this in commit eac590217a on Feb 2, 2026
  19. fanquake referenced this in commit 9d4c9b0035 on Feb 2, 2026
  20. fjahr referenced this in commit 23c2527f12 on Feb 8, 2026
  21. real-or-random referenced this in commit 7a5f153d71 on Mar 4, 2026
  22. vmta referenced this in commit 1ddc2f947f on Apr 26, 2026
  23. vmta referenced this in commit 56c40fe100 on Apr 27, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:52 UTC