autogen.sh: add a 'mock' option

This autoreconfs and configures cockpit using mocked dependencies, in
order to be able to "make dist" with as few dependencies as possible.
This commit is contained in:
Allison Karlitskaya 2022-01-27 10:02:13 +01:00 committed by Martin Pitt
parent 23c88ef199
commit 859640cc4c

View file

@ -8,6 +8,18 @@ srcdir="$(realpath -m "$0"/..)"
[ -n "${NOCONFIGURE:-}" ] && exit
case "${1:-}" in
mock)
# broken configuration with as few deps as possible
# mostly only useful for running `make dep`
exec ./autogen.sh \
CPPFLAGS=-Itools/mock-build-env \
PKG_CONFIG_PATH=tools/mock-build-env \
--enable-prefix-only \
--disable-pcp \
--disable-polkit \
--disable-ssh \
;;
rpm)
# configure with the same flags as when building an RPM
mkdir -p tmp/rpmbuild/SPECS