apps/MAKE: Add register staging to context

context -> context
           register

Change-Id: Ief13064cd2faac31fbaf7140ae2e144d0881b2a1
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2020-07-16 20:29:35 +08:00 committed by Matias N
parent 3061dbf2f8
commit 3c4089ef30
3 changed files with 20 additions and 13 deletions

View File

@ -198,6 +198,8 @@ install::
endif # BUILD_MODULE
context::
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
ifneq ($(PROGNAME),)
ifneq ($(PRIORITY),)
@ -212,18 +214,18 @@ $(REGLIST): $(DEPCONFIG) Makefile
$(if $(filter-out $(firstword $(PRIORITY)),$(PRIORITY)),$(eval PRIORITY=$(filter-out $(firstword $(PRIORITY)),$(PRIORITY))))
$(if $(filter-out $(firstword $(STACKSIZE)),$(STACKSIZE)),$(eval STACKSIZE=$(filter-out $(firstword $(STACKSIZE)),$(STACKSIZE))))
context:: $(REGLIST)
register:: $(REGLIST)
else
context::
register::
endif
else
context::
register::
endif
else
context::
register::
endif
else
context::
register::
endif
.depend: Makefile $(wildcard $(foreach SRC, $(SRCS), $(addsuffix /$(SRC), $(subst :, ,$(VPATH))))) $(DEPCONFIG)

View File

@ -52,12 +52,14 @@ all:
$(RM) $(BIN)
$(MAKE) $(BIN)
.PHONY: import install dirlinks context context_serialize clean_context context_rest export .depdirs preconfig depend clean distclean
.PHONY: import install dirlinks export .depdirs preconfig depend clean distclean
.PHONY: context clean_context context_all register register_all
.PRECIOUS: $(BIN)
$(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),all)))
$(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),install)))
$(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),context)))
$(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),register)))
$(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)))
@ -82,6 +84,7 @@ install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
import: $(IMPORT_TOOLS)
$(Q) $(MAKE) context TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) register TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
@ -144,6 +147,7 @@ endif
import: $(IMPORT_TOOLS)
$(Q) $(MAKE) context TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) register TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) depend TOPDIR="$(APPDIR)$(DELIM)import"
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
@ -152,13 +156,12 @@ endif # CONFIG_BUILD_KERNEL
dirlinks:
$(Q) $(MAKE) -C platform dirlinks
context_rest: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_context)
context_all: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_context)
register_all: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_register)
context_serialize:
$(Q) $(MAKE) -C builtin context
$(Q) $(MAKE) context_rest
context: context_serialize
context:
$(Q) $(MAKE) context_all
$(Q) $(MAKE) register_all
Kconfig:
$(foreach SDIR, $(CONFIGDIRS), $(call MAKE_template,$(SDIR),preconfig))

View File

@ -41,12 +41,14 @@ SUBDIRS = arch include libs scripts startup tmp tools
FILES = .config System.map User.map
all:
.PHONY: context depend clean distclean
.PHONY: context register depend clean distclean
install:
context:
register:
depend:
clean: