zinit
zinit copied to clipboard
Add support for multiple (cmake, scons, meson) build systems to the configure'' ice.
Description
User can rely on autodetection (by a test for build file of a given system, like meson.build
) or request a run of a particular system by specifying a flag:
-
c
-cmake -
s
-scons -
m
-meson -
0
-default (configure)
…plus the previous flags:
-
#
-always run./autogen.sh
-
!
-execute beforemake'!'
Then follow options to be passed to the build system command, e.g.: configure'!#0 --help'
will show configure's help message and try to run ./autogen.sh
, too (and also run before make'!'
because of !
flag).
Some systems, like scons
, may build the project instantly, without need for the make''
ice.
Motivation and Context
configure''
ice is a good point to hook up with various build systems handling. Basically, via the configure ice the user shouldn't bother what build system the cloned project has – it will be autodetected to be one of autotools, cmake, scons or meson – and then run with the PREFIX set to $ZPFX appropriately.
Related Issue(s)
#294
Usage examples
# Run meson help screen
zi configure"m --help" for zdharma-continuum/null
# Run configure help screen
zi configure"0 --help" for zdharma-continuum/null
# Run cmake help screen
zi configure"c --help" for zdharma-continuum/null
# Build and install GLib into $ZPFX (meson build)
zi id-as null configure make"install" cloneopts"--depth=1" for GNOME/glib
How Has This Been Tested?
I've cloned a CMake and Autotools shared project multiple times plugging different flags.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
@vladdoster: I've manually merged the changes and ideas from #345 into this PR. I hope that I've preserved all that's new, and that you don't mind :pray: :smile:
@psprint Sorry I'm just getting around to this PR, I have been on vacation.
Do you want to re-open this PR?
Yes, feel free to reopen it
Hi @vladoster: ping, what about this and other PRs?
@vladdoster Any objections to the PR? When will it be merged?
:tada: This PR is included in version 3.8.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: