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:

    0$ ./autogen.sh | grep -v libtoolize
    1configure.ac:38: installing './ar-lib'
    2configure.ac:36: installing './compile'
    3configure.ac:23: installing './config.guess'
    4configure.ac:23: installing './config.sub'
    5configure.ac:26: installing './install-sh'
    6configure.ac:26: installing './missing'
    7Makefile.am: installing './depcomp'
    8parallel-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.


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: 2025-11-21 05:15 UTC

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