summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 143ac81736..d2e31d98af 100644
--- a/Makefile
+++ b/Makefile
@@ -18,17 +18,26 @@ git-submodule-update:
.PHONY: git-submodule-update
-ifeq (0,$(MAKELEVEL))
- git_module_status := $(shell \
- cd '$(SRC_PATH)' && \
- ./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))
git-submodule-update:
$(call quiet-command, \
- (cd $(SRC_PATH) && ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
+ 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
@@ -396,7 +405,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
CAP_CFLAGS += -DCAPSTONE_HAS_X86
subdir-capstone: .git-submodule-status
- $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
+ $(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
$(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))