[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v1 6/6] build: remove use of MAKELEVEL optimization i
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PULL v1 6/6] build: remove use of MAKELEVEL optimization in submodule handling |
Date: |
Tue, 7 Nov 2017 10:16:42 +0000 |
The Makefile attempts to optimize the handling of submodules by using MAKELEVEL
to only check the submodule status when running from the top level make
invokation. This causes problems for people who are using a makefile of their
own to in turn invoke QEMU's makefile, as MAKELEVEL is already set to 1 (or
more) when QEMU's makefile runs.
This optimization should not really be needed, since the git-submodule.sh
script is already used to detect if a submodule update is required. This by
removing the MAKELEVEL check, we at most add an extra 'git-submodule.sh status'
call to each make level, the overhead of which is lost in noise of building
QEMU.
Reviewed-by: Greg Kurz <address@hidden>
Tested-by: Greg Kurz <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
---
Makefile | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index a92d7b8e14..0496c5057a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,12 +18,11 @@ git-submodule-update:
.PHONY: git-submodule-update
-ifeq (0,$(MAKELEVEL))
- git_module_status := $(shell \
- cd '$(SRC_PATH)' && \
- GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
- echo $$?; \
- )
+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))
@@ -42,7 +41,6 @@ git-submodule-update:
"GIT","$(GIT_SUBMODULES)")
endif
endif
-endif
.git-submodule-status: git-submodule-update config-host.mak
--
2.13.6
- [Qemu-devel] [PULL v1 0/6] Merge build 2017/11/07, Daniel P. Berrange, 2017/11/07
- [Qemu-devel] [PULL v1 3/6] build: allow automatic git submodule updates to be disabled, Daniel P. Berrange, 2017/11/07
- [Qemu-devel] [PULL v1 1/6] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/11/07
- [Qemu-devel] [PULL v1 5/6] build: delay check for empty git submodule list, Daniel P. Berrange, 2017/11/07
- [Qemu-devel] [PULL v1 2/6] build: don't create temporary files in source dir, Daniel P. Berrange, 2017/11/07
- [Qemu-devel] [PULL v1 6/6] build: remove use of MAKELEVEL optimization in submodule handling,
Daniel P. Berrange <=
- [Qemu-devel] [PULL v1 4/6] build: don't fail if given a git submodule which does not exist, Daniel P. Berrange, 2017/11/07
- Re: [Qemu-devel] [PULL v1 0/6] Merge build 2017/11/07, Peter Maydell, 2017/11/07