You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/02/27 10:43:05 UTC
[incubator-nuttx-apps] 01/02: example/module/drivers: Ensure
"build" before "install"
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch pr106
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit a572ff01255e185ecfcc35b1f66fd5f5b3d8cf61
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Thu Feb 27 13:42:57 2020 +0800
example/module/drivers: Ensure "build" before "install"
Change-Id: I7b95d8f751da4889012b129f6036f7cdc2ed7ec9
Signed-off-by: liuhaitao <li...@xiaomi.com>
---
examples/module/drivers/Makefile | 8 ++++----
examples/module/drivers/chardev/Makefile | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile
index 45a7b11..bddb359 100644
--- a/examples/module/drivers/Makefile
+++ b/examples/module/drivers/Makefile
@@ -58,16 +58,16 @@ else ifeq ($(CONFIG_EXAMPLES_MODULE_CROMFS),y)
endif
define DIR_template
-$(1)_$(2):
+$(1)_$(2): $(4)
+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" FSROOT_DIR="$(FSROOT_DIR)" CROSSDEV=$(CROSSDEV)
endef
all: $(FSIMG_HDR) $(DIRLIST_HDR) $(SYMTAB_SRC) $(PASS1_SYMTAB)
.PHONY: all build clean install populate
-$(foreach DIR, $(BUILD_SUBDIRS), $(eval $(call DIR_template,$(DIR),build, all)))
-$(foreach DIR, $(ALL_SUBDIRS), $(eval $(call DIR_template,$(DIR),clean,clean)))
-$(foreach DIR, $(BUILD_SUBDIRS), $(eval $(call DIR_template,$(DIR),install,install)))
+$(foreach DIR, $(BUILD_SUBDIRS), $(eval $(call DIR_template,$(DIR),build,all,)))
+$(foreach DIR, $(ALL_SUBDIRS), $(eval $(call DIR_template,$(DIR),clean,clean,)))
+$(foreach DIR, $(BUILD_SUBDIRS), $(eval $(call DIR_template,$(DIR),install,install,$(DIR)_build)))
# Build program(s) in each sud-directory
diff --git a/examples/module/drivers/chardev/Makefile b/examples/module/drivers/chardev/Makefile
index 5b290d5..ea646cb 100644
--- a/examples/module/drivers/chardev/Makefile
+++ b/examples/module/drivers/chardev/Makefile
@@ -92,6 +92,6 @@ clean:
$(call DELFILE, $(BIN))
$(call CLEAN)
-install: $(BIN)
+install:
$(Q) mkdir -p $(FSROOT_DIR)
$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)