Move MAKE_template and SDIR_template to Make.defs (#135)
So Directory.mk and Makefile can share the same definition
This commit is contained in:
parent
6e3a9a2eda
commit
6ddf347178
@ -44,11 +44,6 @@ all: nothing
|
||||
|
||||
.PHONY: nothing context depend clean distclean
|
||||
|
||||
define SDIR_template
|
||||
$(1)_$(2):
|
||||
+$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" BINDIR="$(BINDIR)"
|
||||
endef
|
||||
|
||||
$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig)))
|
||||
$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),context)))
|
||||
$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend)))
|
||||
|
13
Make.defs
13
Make.defs
@ -73,6 +73,19 @@ BINDIR ?= $(APPDIR)$(DELIM)bin
|
||||
|
||||
BIN ?= $(APPDIR)$(DELIM)libapps$(LIBEXT)
|
||||
|
||||
# Invoke make
|
||||
|
||||
define MAKE_template
|
||||
+$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
|
||||
|
||||
endef
|
||||
|
||||
define SDIR_template
|
||||
$(1)_$(2):
|
||||
+$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
|
||||
|
||||
endef
|
||||
|
||||
# Builtin Registration
|
||||
|
||||
BUILTIN_REGISTRY = $(APPDIR)$(DELIM)builtin$(DELIM)registry
|
||||
|
11
Makefile
11
Makefile
@ -61,17 +61,6 @@ all: $(BIN)
|
||||
.PHONY: import install dirlinks context context_serialize clean_context context_rest export .depdirs preconfig depend clean distclean
|
||||
.PRECIOUS: $(BIN)
|
||||
|
||||
define MAKE_template
|
||||
+$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
|
||||
|
||||
endef
|
||||
|
||||
define SDIR_template
|
||||
$(1)_$(2):
|
||||
+$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
|
||||
|
||||
endef
|
||||
|
||||
$(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)))
|
||||
|
Loading…
Reference in New Issue
Block a user