You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/22 21:47:27 UTC

[incubator-nuttx-apps] branch pr136 updated (cc5ad09 -> 4ea1eb7)

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a change to branch pr136
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


    from cc5ad09  Don't generate .depend anymore
     new 9394424  Revert "examples/sotest/lib: Fix dependency"
     new 8a7ea16  Revert "examples/elf/tests: Ensure "build" before "install""
     new 258e014  Revert "Ensure "build" before "install""
     new 4ea1eb7  Makefile: let install depend on the target binary

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Application.mk                                    |  1 +
 Makefile                                          | 16 ++--------
 examples/elf/tests/Makefile                       |  8 ++---
 examples/elf/tests/errno/Makefile                 | 10 +++---
 examples/elf/tests/hello/Makefile                 | 10 +++---
 examples/elf/tests/helloxx/Makefile               | 38 +++++++++++++++++------
 examples/elf/tests/longjmp/Makefile               | 10 +++---
 examples/elf/tests/mutex/Makefile                 | 10 +++---
 examples/elf/tests/pthread/Makefile               | 10 +++---
 examples/elf/tests/signal/Makefile                | 10 +++---
 examples/elf/tests/struct/Makefile                | 10 +++---
 examples/elf/tests/task/Makefile                  | 10 +++---
 examples/module/drivers/Makefile                  |  8 ++---
 examples/module/drivers/chardev/Makefile          | 10 +++---
 examples/nxflat/tests/Makefile                    |  8 ++---
 examples/nxflat/tests/errno/Makefile              |  8 +++--
 examples/nxflat/tests/hello++/Makefile            | 21 ++++++++-----
 examples/nxflat/tests/hello/Makefile              |  8 +++--
 examples/nxflat/tests/longjmp/Makefile            |  8 +++--
 examples/nxflat/tests/mutex/Makefile              |  8 +++--
 examples/nxflat/tests/pthread/Makefile            |  8 +++--
 examples/nxflat/tests/signal/Makefile             |  8 +++--
 examples/nxflat/tests/struct/Makefile             |  8 +++--
 examples/nxflat/tests/task/Makefile               |  8 +++--
 examples/posix_spawn/filesystem/hello/Makefile    | 10 +++---
 examples/posix_spawn/filesystem/redirect/Makefile | 10 +++---
 examples/sotest/lib/Makefile                      |  8 ++---
 examples/sotest/lib/modprint/Makefile             | 10 +++---
 examples/sotest/lib/sotest/Makefile               | 10 +++---
 examples/thttpd/content/hello/Makefile            |  8 +++--
 examples/thttpd/content/tasks/Makefile            |  8 +++--
 tools/mksymtab.sh                                 |  7 -----
 32 files changed, 190 insertions(+), 135 deletions(-)


[incubator-nuttx-apps] 01/04: Revert "examples/sotest/lib: Fix dependency"

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr136
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 9394424b1e65109935f7ae7294904f76f74b33ac
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Mar 17 18:16:22 2020 +0800

    Revert "examples/sotest/lib: Fix dependency"
    
    This reverts commit 0cb3712c198688a99beed47941a619382426c588.
---
 examples/sotest/lib/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/sotest/lib/Makefile b/examples/sotest/lib/Makefile
index c402b96..0b69332 100644
--- a/examples/sotest/lib/Makefile
+++ b/examples/sotest/lib/Makefile
@@ -52,16 +52,16 @@ ROMFS_HDR = $(LIB_DIR)/romfs.h
 SYMTAB_SRC = $(LIB_DIR)/sot_symtab.c
 
 define DIR_template
-$(1)_$(2): $(4)
+$(1)_$(2):
 	+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" FSROOT_DIR="$(FSROOT_DIR)" CROSSDEV=$(CROSSDEV)
 endef
 
 all: $(ROMFS_HDR) $(DIRLIST_HDR) $(SYMTAB_SRC)
 .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,$(DIR)_build)))
+$(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)))
 
 # Build program(s) in each sud-directory
 


[incubator-nuttx-apps] 04/04: Makefile: let install depend on the target binary

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr136
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 4ea1eb78633753aa04883637e7a32cea7a964497
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Mar 16 17:12:16 2020 +0800

    Makefile: let install depend on the target binary
    
    to ensure the binary get built and install once
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 Application.mk                                    |  1 +
 Makefile                                          | 16 ++--------
 examples/elf/tests/errno/Makefile                 | 10 +++---
 examples/elf/tests/hello/Makefile                 | 10 +++---
 examples/elf/tests/helloxx/Makefile               | 38 +++++++++++++++++------
 examples/elf/tests/longjmp/Makefile               | 10 +++---
 examples/elf/tests/mutex/Makefile                 | 10 +++---
 examples/elf/tests/pthread/Makefile               | 10 +++---
 examples/elf/tests/signal/Makefile                | 10 +++---
 examples/elf/tests/struct/Makefile                | 10 +++---
 examples/elf/tests/task/Makefile                  | 10 +++---
 examples/module/drivers/chardev/Makefile          | 10 +++---
 examples/nxflat/tests/errno/Makefile              |  8 +++--
 examples/nxflat/tests/hello++/Makefile            | 21 ++++++++-----
 examples/nxflat/tests/hello/Makefile              |  8 +++--
 examples/nxflat/tests/longjmp/Makefile            |  8 +++--
 examples/nxflat/tests/mutex/Makefile              |  8 +++--
 examples/nxflat/tests/pthread/Makefile            |  8 +++--
 examples/nxflat/tests/signal/Makefile             |  8 +++--
 examples/nxflat/tests/struct/Makefile             |  8 +++--
 examples/nxflat/tests/task/Makefile               |  8 +++--
 examples/posix_spawn/filesystem/hello/Makefile    | 10 +++---
 examples/posix_spawn/filesystem/redirect/Makefile | 10 +++---
 examples/sotest/lib/modprint/Makefile             | 10 +++---
 examples/sotest/lib/sotest/Makefile               | 10 +++---
 examples/thttpd/content/hello/Makefile            |  8 +++--
 examples/thttpd/content/tasks/Makefile            |  8 +++--
 tools/mksymtab.sh                                 |  7 -----
 28 files changed, 174 insertions(+), 119 deletions(-)

diff --git a/Application.mk b/Application.mk
index 686dc2b..3187939 100644
--- a/Application.mk
+++ b/Application.mk
@@ -151,6 +151,7 @@ PROGLIST := $(addprefix $(BINDIR)$(DELIM),$(PROGLIST))
 PROGOBJ := $(MAINOBJ)
 
 $(PROGLIST): $(MAINOBJ)
+	$(Q) mkdir -p $(BINDIR)
 ifeq ($(WINTOOL),y)
 	$(call ELFLD,$(firstword $(PROGOBJ)),"${shell cygpath -w $(firstword $(PROGLIST))}")
 else
diff --git a/Makefile b/Makefile
index 6e90727..8f037c3 100644
--- a/Makefile
+++ b/Makefile
@@ -73,17 +73,12 @@ $(foreach SDIR, $(CLEANDIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
 
 ifeq ($(CONFIG_BUILD_KERNEL),y)
 
-.install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
-
-install: $(BINDIR) .install
-
-$(BINDIR):
-	$(Q) mkdir -p $(BINDIR)
+install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
 
 .import: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
 	$(Q) $(MAKE) install TOPDIR="$(TOPDIR)"
 
-import: $(BINDIR)
+import:
 	$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
 
 else
@@ -114,12 +109,7 @@ endif
 
 endif # !CONFIG_BUILD_LOADABLE
 
-.install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
-
-$(BINDIR):
-	$(Q) mkdir -p $(BINDIR)
-
-install: $(BINDIR) .install
+install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
 
 .import: $(BIN) install
 
diff --git a/examples/elf/tests/errno/Makefile b/examples/elf/tests/errno/Makefile
index ecac55f..ea7c54d 100644
--- a/examples/elf/tests/errno/Makefile
+++ b/examples/elf/tests/errno/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/hello/Makefile b/examples/elf/tests/hello/Makefile
index abee219..b5b3e85 100644
--- a/examples/elf/tests/hello/Makefile
+++ b/examples/elf/tests/hello/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/helloxx/Makefile b/examples/elf/tests/helloxx/Makefile
index 24a380c..3c4af09 100644
--- a/examples/elf/tests/helloxx/Makefile
+++ b/examples/elf/tests/helloxx/Makefile
@@ -67,15 +67,19 @@ LDLIBS += -lproxies
 endif
 
 BIN1 = hello++1
+ALL_BIN = $(FSIMG_DIR)/$(BIN1)
 BIN2 = hello++2
+ALL_BIN += $(FSIMG_DIR)/$(BIN2)
 ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y)
 BIN3 = hello++3
+ALL_BIN += $(FSIMG_DIR)/$(BIN3)
 ifeq ($(CONFIG_EXAMPLES_ELF_UCLIBCXX),y)
 BIN4 = hello++4
+ALL_BIN += $(FSIMG_DIR)/$(BIN4)
 BIN5 = hello++5
+ALL_BIN += $(FSIMG_DIR)/$(BIN5)
 endif
 endif
-ALL_BIN = $(BIN1) $(BIN2) $(BIN3) $(BIN4) $(BIN5)
 
 SRCS1 = $(BIN1).c
 OBJS1 = $(SRCS1:.c=$(OBJEXT))
@@ -147,22 +151,36 @@ $(BIN5): $(OBJS5)
 endif
 endif
 
-clean:
-	$(call DELFILE, $(BIN1))
-	$(call DELFILE, $(BIN2))
-	$(call DELFILE, $(BIN3))
-	$(call DELFILE, $(BIN4))
-	$(call DELFILE, $(BIN5))
-	$(call CLEAN)
-
-install: $(ALL_BIN)
+$(FSIMG_DIR)/$(BIN1): $(BIN1)
 	$(Q) mkdir -p $(FSIMG_DIR)
 	$(Q) install $(BIN1) $(FSIMG_DIR)/$(BIN1)
+
+$(FSIMG_DIR)/$(BIN2): $(BIN2)
+	$(Q) mkdir -p $(FSIMG_DIR)
 	$(Q) install $(BIN2) $(FSIMG_DIR)/$(BIN2)
+
 ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y)
+$(FSIMG_DIR)/$(BIN3): $(BIN3)
+	$(Q) mkdir -p $(FSIMG_DIR)
 	$(Q) install $(BIN3) $(FSIMG_DIR)/$(BIN3)
+
 ifeq ($(CONFIG_EXAMPLES_ELF_UCLIBCXX),y)
+$(FSIMG_DIR)/$(BIN4): $(BIN4)
+	$(Q) mkdir -p $(FSIMG_DIR)
 	$(Q) install $(BIN4) $(FSIMG_DIR)/$(BIN4)
+
+$(FSIMG_DIR)/$(BIN5): $(BIN5)
+	$(Q) mkdir -p $(FSIMG_DIR)
 	$(Q) install $(BIN5) $(FSIMG_DIR)/$(BIN5)
 endif
 endif
+
+install: $(ALL_BIN)
+
+clean:
+	$(call DELFILE, $(BIN1))
+	$(call DELFILE, $(BIN2))
+	$(call DELFILE, $(BIN3))
+	$(call DELFILE, $(BIN4))
+	$(call DELFILE, $(BIN5))
+	$(call CLEAN)
diff --git a/examples/elf/tests/longjmp/Makefile b/examples/elf/tests/longjmp/Makefile
index c15ef4a..c943491 100644
--- a/examples/elf/tests/longjmp/Makefile
+++ b/examples/elf/tests/longjmp/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/mutex/Makefile b/examples/elf/tests/mutex/Makefile
index 53bf2ac..b864d67 100644
--- a/examples/elf/tests/mutex/Makefile
+++ b/examples/elf/tests/mutex/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/pthread/Makefile b/examples/elf/tests/pthread/Makefile
index 26aa9f9..742c811 100644
--- a/examples/elf/tests/pthread/Makefile
+++ b/examples/elf/tests/pthread/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/signal/Makefile b/examples/elf/tests/signal/Makefile
index e582c32..e2f21ff 100644
--- a/examples/elf/tests/signal/Makefile
+++ b/examples/elf/tests/signal/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/struct/Makefile b/examples/elf/tests/struct/Makefile
index cdf32c0..bf7faeb 100644
--- a/examples/elf/tests/struct/Makefile
+++ b/examples/elf/tests/struct/Makefile
@@ -83,10 +83,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/elf/tests/task/Makefile b/examples/elf/tests/task/Makefile
index c46a251..3ebaa3b 100644
--- a/examples/elf/tests/task/Makefile
+++ b/examples/elf/tests/task/Makefile
@@ -82,10 +82,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSIMG_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSIMG_DIR)
+	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
+
+install: $(FSIMG_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSIMG_DIR)
-	$(Q) install $(BIN) $(FSIMG_DIR)/$(BIN)
diff --git a/examples/module/drivers/chardev/Makefile b/examples/module/drivers/chardev/Makefile
index 5b290d5..1144f0c 100644
--- a/examples/module/drivers/chardev/Makefile
+++ b/examples/module/drivers/chardev/Makefile
@@ -88,10 +88,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDMODULEFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSROOT_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSROOT_DIR)
+	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
+
+install: $(FSROOT_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install: $(BIN)
-	$(Q) mkdir -p $(FSROOT_DIR)
-	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/errno/Makefile b/examples/nxflat/tests/errno/Makefile
index b63af3f..0014e66 100644
--- a/examples/nxflat/tests/errno/Makefile
+++ b/examples/nxflat/tests/errno/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/hello++/Makefile b/examples/nxflat/tests/hello++/Makefile
index d148360..ea2b8eb 100644
--- a/examples/nxflat/tests/hello++/Makefile
+++ b/examples/nxflat/tests/hello++/Makefile
@@ -39,7 +39,6 @@ BIN1			= hello++1
 BIN2			= hello++2
 BIN3			= hello++3
 #BIN4			= hello++4
-ALL_BIN			= $(BIN1) $(BIN2) $(BIN3) $(BIN4)
 
 R1SRCS1			= $(BIN1).c
 R1OBJS1			= $(R1SRCS1:.c=.o)
@@ -162,6 +161,20 @@ $(BIN3): $(BIN3).r2
 #	@echo "LD: $<"
 #	$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN1): $(BIN1)
+	$(Q) install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
+
+$(ROMFS_DIR)/$(BIN2): $(BIN2)
+	$(Q) install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
+
+$(ROMFS_DIR)/$(BIN3): $(BIN3)
+	$(Q) install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
+
+#$(ROMFS_DIR)/$(BIN4): $(BIN4)
+#	$(Q) install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
+
+install: $(ROMFS_DIR)/$(BIN1) $(ROMFS_DIR)/$(BIN2) $(ROMFS_DIR)/$(BIN3)
+
 clean:
 	$(call DELFILE, $(BIN1))
 	$(call DELFILE, $(BIN2))
@@ -174,9 +187,3 @@ clean:
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install: $(ALL_BIN)
-	$(Q) install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
-	$(Q) install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
-	$(Q) install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
-#	$(Q) install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
diff --git a/examples/nxflat/tests/hello/Makefile b/examples/nxflat/tests/hello/Makefile
index 040e377..eb60dd6 100644
--- a/examples/nxflat/tests/hello/Makefile
+++ b/examples/nxflat/tests/hello/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/longjmp/Makefile b/examples/nxflat/tests/longjmp/Makefile
index 0e48afa..8a98467 100644
--- a/examples/nxflat/tests/longjmp/Makefile
+++ b/examples/nxflat/tests/longjmp/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/mutex/Makefile b/examples/nxflat/tests/mutex/Makefile
index 855aca5..b53a499 100644
--- a/examples/nxflat/tests/mutex/Makefile
+++ b/examples/nxflat/tests/mutex/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/pthread/Makefile b/examples/nxflat/tests/pthread/Makefile
index 38432f4..1649410 100644
--- a/examples/nxflat/tests/pthread/Makefile
+++ b/examples/nxflat/tests/pthread/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/signal/Makefile b/examples/nxflat/tests/signal/Makefile
index 5b08e99..2211747 100644
--- a/examples/nxflat/tests/signal/Makefile
+++ b/examples/nxflat/tests/signal/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/struct/Makefile b/examples/nxflat/tests/struct/Makefile
index 94f1077..77cd7e7 100644
--- a/examples/nxflat/tests/struct/Makefile
+++ b/examples/nxflat/tests/struct/Makefile
@@ -71,12 +71,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/task/Makefile b/examples/nxflat/tests/task/Makefile
index 177bc75..e532be4 100644
--- a/examples/nxflat/tests/task/Makefile
+++ b/examples/nxflat/tests/task/Makefile
@@ -69,12 +69,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/posix_spawn/filesystem/hello/Makefile b/examples/posix_spawn/filesystem/hello/Makefile
index 3c9d0fc..fc316fc 100644
--- a/examples/posix_spawn/filesystem/hello/Makefile
+++ b/examples/posix_spawn/filesystem/hello/Makefile
@@ -51,11 +51,13 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(ROMFS_DIR)
+	$(Q) install $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, *.dSYM)
 	$(call CLEAN)
-
-install: $(BIN)
-	$(Q) mkdir -p $(ROMFS_DIR)
-	$(Q) install $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/posix_spawn/filesystem/redirect/Makefile b/examples/posix_spawn/filesystem/redirect/Makefile
index 9b30d4b..47b543d 100644
--- a/examples/posix_spawn/filesystem/redirect/Makefile
+++ b/examples/posix_spawn/filesystem/redirect/Makefile
@@ -51,11 +51,13 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDELFFLAGS) -o $@ $^
 
+$(ROMFS_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(ROMFS_DIR)
+	$(Q) install -m 0755 $(BIN) $(ROMFS_DIR)/$(BIN)
+
+install: $(ROMFS_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, *.dSYM)
 	$(call CLEAN)
-
-install: $(BIN)
-	$(Q) mkdir -p $(ROMFS_DIR)
-	$(Q) install -m 0755 $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/examples/sotest/lib/modprint/Makefile b/examples/sotest/lib/modprint/Makefile
index 3c77986..96e230e 100644
--- a/examples/sotest/lib/modprint/Makefile
+++ b/examples/sotest/lib/modprint/Makefile
@@ -88,10 +88,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDMODULEFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSROOT_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSROOT_DIR)
+	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
+
+install: $(FSROOT_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSROOT_DIR)
-	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
diff --git a/examples/sotest/lib/sotest/Makefile b/examples/sotest/lib/sotest/Makefile
index 45c9ac6..c0ac2e4 100644
--- a/examples/sotest/lib/sotest/Makefile
+++ b/examples/sotest/lib/sotest/Makefile
@@ -88,10 +88,12 @@ $(BIN): $(OBJS)
 	@echo "LD: $<"
 	$(Q) $(LD) $(LDMODULEFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
 
+$(FSROOT_DIR)/$(BIN): $(BIN)
+	$(Q) mkdir -p $(FSROOT_DIR)
+	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
+
+install: $(FSROOT_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
-
-install:
-	$(Q) mkdir -p $(FSROOT_DIR)
-	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
diff --git a/examples/thttpd/content/hello/Makefile b/examples/thttpd/content/hello/Makefile
index 226cbd0..dcdcb99 100644
--- a/examples/thttpd/content/hello/Makefile
+++ b/examples/thttpd/content/hello/Makefile
@@ -70,12 +70,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(CGI_DIR)/$(BIN): $(BIN)
+	$(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN)
+
+install: $(CGI_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN)
diff --git a/examples/thttpd/content/tasks/Makefile b/examples/thttpd/content/tasks/Makefile
index de3d576..f0304fc 100644
--- a/examples/thttpd/content/tasks/Makefile
+++ b/examples/thttpd/content/tasks/Makefile
@@ -73,12 +73,14 @@ $(BIN): $(BIN).r2
 	@echo "LD: $<"
 	$(Q) $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
 
+$(CGI_DIR)/$(BIN): $(BIN)
+	$(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN)
+
+install: $(CGI_DIR)/$(BIN)
+
 clean:
 	$(call DELFILE, $(BIN))
 	$(call DELFILE, $(R2SRC))
 	$(call DELFILE, *.r1)
 	$(call DELFILE, *.r2)
 	$(call CLEAN)
-
-install:
-	$(Q) install -m 0755 -D $(BIN) $(CGI_DIR)/$(BIN)
diff --git a/tools/mksymtab.sh b/tools/mksymtab.sh
index 1cc616a..f8414d6 100755
--- a/tools/mksymtab.sh
+++ b/tools/mksymtab.sh
@@ -48,13 +48,6 @@ if [ -z "$dir" ]; then
   exit 1
 fi
 
-if [ ! -d "$dir" ]; then
-  echo "ERROR: Directory $dir does not exist"
-  echo ""
-  echo $usage
-  exit 1
-fi
-
 # Get the output file name
 
 outfile=$2


[incubator-nuttx-apps] 03/04: Revert "Ensure "build" before "install""

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr136
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 258e01402582c77550c2d08b6a70226ed1e9a6ae
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Mar 22 20:04:10 2020 +0800

    Revert "Ensure "build" before "install""
    
    This reverts commit 404b330c25567923de8434e34dd1dbe8ccf59b8b.
---
 examples/module/drivers/Makefile         | 8 ++++----
 examples/module/drivers/chardev/Makefile | 2 +-
 examples/nxflat/tests/Makefile           | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile
index 7d255ce..6e64629 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): $(4)
+$(1)_$(2):
 	+$(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,$(DIR)_build)))
+$(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)))
 
 # Build program(s) in each sud-directory
 
diff --git a/examples/module/drivers/chardev/Makefile b/examples/module/drivers/chardev/Makefile
index ea646cb..5b290d5 100644
--- a/examples/module/drivers/chardev/Makefile
+++ b/examples/module/drivers/chardev/Makefile
@@ -92,6 +92,6 @@ clean:
 	$(call DELFILE, $(BIN))
 	$(call CLEAN)
 
-install:
+install: $(BIN)
 	$(Q) mkdir -p $(FSROOT_DIR)
 	$(Q) install $(BIN) $(FSROOT_DIR)/$(BIN)
diff --git a/examples/nxflat/tests/Makefile b/examples/nxflat/tests/Makefile
index d065bbc..544cd02 100644
--- a/examples/nxflat/tests/Makefile
+++ b/examples/nxflat/tests/Makefile
@@ -54,16 +54,16 @@ ROMFS_DIRLIST	= $(TESTS_DIR)/dirlist.h
 SYMTAB		= $(TESTS_DIR)/symtab.h
 
 define DIR_template
-$(1)_$(2): $(4)
+$(1)_$(2):
 	+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" ROMFS_DIR="$(ROMFS_DIR)" CROSSDEV=$(CROSSDEV)
 endef
 
 all: $(ROMFS_HDR) $(ROMFS_DIRLIST) $(SYMTAB)
 .PHONY: all build clean install populate
 
-$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),build,all,)))
-$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),clean,clean,)))
-$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),install,install,$(DIR)_build)))
+$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),build, all)))
+$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),clean,clean)))
+$(foreach DIR, $(SUBDIRS), $(eval $(call DIR_template,$(DIR),install,install)))
 
 # Build program(s) in each sud-directory
 


[incubator-nuttx-apps] 02/04: Revert "examples/elf/tests: Ensure "build" before "install""

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr136
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 8a7ea1695dfb243a42d2ca56f3e90bd6cac4822f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Mar 17 17:53:35 2020 +0800

    Revert "examples/elf/tests: Ensure "build" before "install""
    
    This reverts commit 2abf0f50e1556f1aeea500c4d2b1df58b1d09aee.
---
 examples/elf/tests/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/elf/tests/Makefile b/examples/elf/tests/Makefile
index 1f0c987..1acf640 100644
--- a/examples/elf/tests/Makefile
+++ b/examples/elf/tests/Makefile
@@ -76,16 +76,16 @@ else
 endif
 
 define DIR_template
-$(1)_$(2): $(4)
+$(1)_$(2):
 	+$(Q) $(MAKE) -C $(1) $(3) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" FSIMG_DIR="$(FSIMG_DIR)" CROSSDEV=$(CROSSDEV)
 endef
 
 all: $(FSIMG_HDR) $(DIRLIST_HDR) $(SYMTAB_SRC)
 .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,$(DIR)_build)))
+$(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)))
 
 # Build program(s) in each sud-directory