From 13df7aca4189e98ddf5c6d93edd083b0f9acfa3c Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Wed, 24 Jun 2020 10:36:33 +0800 Subject: [PATCH] make/import: support depend context on import build Change-Id: Ia390a2defdb6a71a60a5f3c261b806d13810626e Signed-off-by: chao.an --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fdca28598..7d9713558 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,9 @@ $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),depend)) $(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) $(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) +$(MKDEP): $(TOPDIR)/tools/mkdeps.c + $(HOSTCC) $(HOSTINCLUDES) $(HOSTCFLAGS) $< -o $@ + # In the KERNEL build, we must build and install all of the modules. No # symbol table is needed @@ -78,7 +81,8 @@ install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install) .import: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all) $(Q) $(MAKE) install TOPDIR="$(TOPDIR)" -import: +import: $(MKDEP) context + $(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import" $(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import" else @@ -113,7 +117,8 @@ install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install) .import: $(BIN) install -import: +import: $(MKDEP) context + $(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import" $(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import" endif # CONFIG_BUILD_KERNEL