configure: replace --enable/disable-git-update with --with-git-submodules
commit7d7dbf9dc15be6e1465c756c2c5ae7f1ab104fc8
authorDan Streetman <ddstreet@canonical.com>
Tue, 19 Jan 2021 17:20:46 +0000 (19 12:20 -0500)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 29 Jan 2021 17:07:53 +0000 (29 17:07 +0000)
tree9e7c34e8604e35dd187704799341fbaf0a1c5944
parentf029f9112257c9a0e669c2955e8ace21a96704c1
configure: replace --enable/disable-git-update with --with-git-submodules

Replace the --enable-git-update and --disable-git-update configure params
with the param --with-git-submodules=(update|validate|ignore) to
allow 3 options for building from a git repo.

This is needed because downstream packagers, e.g. Debian, Ubuntu, etc,
also keep the source code in git, but do not want to enable the
'git_update' mode; with the current code, that's not possible even
if the downstream package specifies --disable-git-update.

The previous parameters are deprecated but still available; the
--enable-git-update parameter maps to --with-git-submodules=update and
--disable-git-update parameter maps to --with-git-submodules=validate.

The configure script behavior is slightly modified, where previously
the dtc, capstone, and slirp submodules were not validated when
--disable-git-update was specified (but were updated with git-update
enabled), now they are validated when using --with-git-submodules=validate
and are only ignored when using --with-git-submodules=ignore.

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Makefile
configure
scripts/git-submodule.sh