diff options
author | Dan Streetman <ddstreet@canonical.com> | 2021-01-19 12:20:46 -0500 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2021-01-29 17:07:53 +0000 |
commit | 7d7dbf9dc15be6e1465c756c2c5ae7f1ab104fc8 (patch) | |
tree | 9e7c34e8604e35dd187704799341fbaf0a1c5944 /Makefile | |
parent | f029f9112257c9a0e669c2955e8ace21a96704c1 (diff) |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 2 insertions, 22 deletions
@@ -47,30 +47,10 @@ git-submodule-update: Makefile: .git-submodule-status .PHONY: git-submodule-update - -git_module_status := $(shell \ - cd '$(SRC_PATH)' && \ - GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \ - echo $$?; \ -) - -ifeq (1,$(git_module_status)) -ifeq (no,$(GIT_UPDATE)) git-submodule-update: $(call quiet-command, \ - echo && \ - echo "GIT submodule checkout is out of date. Please run" && \ - echo " scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \ - echo "from the source directory checkout $(SRC_PATH)" && \ - echo && \ - exit 1) -else -git-submodule-update: - $(call quiet-command, \ - (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \ - "GIT","$(GIT_SUBMODULES)") -endif -endif + (GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \ + "GIT","$(GIT_SUBMODULES)") # 0. ensure the build tree is okay |