zinit icon indicating copy to clipboard operation
zinit copied to clipboard

Add support for multiple (cmake, scons, meson) build systems to the configure'' ice.

Open psprint opened this issue 1 year ago • 5 comments

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 before make'!'

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.

psprint avatar Jul 19 '22 23:07 psprint

@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 avatar Jul 20 '22 04:07 psprint

@psprint Sorry I'm just getting around to this PR, I have been on vacation.

Do you want to re-open this PR?

vladdoster avatar Aug 14 '22 04:08 vladdoster

Yes, feel free to reopen it

psprint avatar Aug 15 '22 09:08 psprint

Hi @vladoster: ping, what about this and other PRs?

psprint avatar Aug 21 '22 11:08 psprint

@vladdoster Any objections to the PR? When will it be merged?

psprint avatar Sep 10 '22 00:09 psprint

:tada: This PR is included in version 3.8.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 07 '22 02:11 github-actions[bot]