build: support selecting enabled utils in Meson

Add a new Meson array option, utils, to allow building only selected applets while keeping the default as all.

Gate source inclusion, dependencies, symlink/manpage/script install steps, and test registration by enabled util set, and make applet dispatch in src/main.c compile-time conditional via generated config defines.

Document selective build usage in README.
This commit is contained in:
2026-04-18 06:34:18 -05:00
parent e1b8aa1594
commit 26e2527492
4 changed files with 361 additions and 65 deletions
+9
View File
@@ -13,6 +13,7 @@ It bundles a growing set of FreeBSD-derived userland tools into a single `vx` bi
- `grep`, `egrep`, `fgrep`, `rgrep`
- `find`
- `xargs`
- `lspci`, `setpci`
## Build
@@ -24,6 +25,14 @@ meson compile -C builddir
meson test -C builddir
```
To build only selected utilities:
```text
meson setup builddir -Dutils=grep,find,xargs
```
The default is `-Dutils=all`.
## Run
You can invoke applets either through the multicall binary: