You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/09 13:40:31 UTC

[incubator-nuttx-apps] branch master updated: examples/nxflat: update Makefile etc to fix build break

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2c924f6  examples/nxflat: update Makefile etc to fix build break
2c924f6 is described below

commit 2c924f657fd17bb6a8e3b809a2b61c2539ecba52
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Thu Jun 4 17:15:04 2020 +0800

    examples/nxflat: update Makefile etc to fix build break
    
    Signed-off-by: liuhaitao <li...@xiaomi.com>
---
 examples/nxflat/Makefile           | 4 ++++
 examples/nxflat/tests/Makefile     | 8 +++++---
 examples/nxflat/tests/mkdirlist.sh | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/examples/nxflat/Makefile b/examples/nxflat/Makefile
index b852740..4ec5a8e 100644
--- a/examples/nxflat/Makefile
+++ b/examples/nxflat/Makefile
@@ -47,6 +47,10 @@ PRIORITY = SCHED_PRIORITY_DEFAULT
 STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
 MODULE = $(CONFIG_EXAMPLES_NXFLAT)
 
+ROOTDEPPATH := --dep-path tests
+
+VPATH += :tests
+
 tests/romfs.c: build
 tests/dirlist.c: build
 tests/symtab.c: build
diff --git a/examples/nxflat/tests/Makefile b/examples/nxflat/tests/Makefile
index 0d125aa..0a8aac5 100644
--- a/examples/nxflat/tests/Makefile
+++ b/examples/nxflat/tests/Makefile
@@ -33,6 +33,8 @@
 #
 ############################################################################
 
+include $(TOPDIR)/Make.defs
+
 # Most of these do no build yet
 #SUBDIRS	= errno hello hello++ longjmp mutex pthread signal task struct
 SUBDIRS		= errno hello struct
@@ -50,7 +52,7 @@ TESTS_DIR	= $(NXFLAT_DIR)/tests
 ROMFS_DIR	= $(TESTS_DIR)/romfs
 ROMFS_IMG	= $(TESTS_DIR)/romfs.img
 ROMFS_SRC	= $(TESTS_DIR)/romfs.c
-DIRLIST_SRC	= $(TESTS_DIR)/dirlist.h
+DIRLIST_SRC	= $(TESTS_DIR)/dirlist.c
 SYMTAB_SRC	= $(TESTS_DIR)/symtab.c
 
 define DIR_template
@@ -79,7 +81,7 @@ $(ROMFS_IMG): install
 $(ROMFS_SRC): $(ROMFS_IMG)
 	$(Q) (cd $(TESTS_DIR); xxd -i romfs.img | sed -e "s/^unsigned/const unsigned/g" >$@)
 
-# Create the dirlist.h header file from the romfs directory
+# Create the dirlist.c file from the romfs directory
 
 $(DIRLIST_SRC): install
 	$(Q) $(TESTS_DIR)/mkdirlist.sh $(ROMFS_DIR) >$@.tmp
@@ -88,7 +90,7 @@ $(DIRLIST_SRC): install
 # Create the exported symbol table list from the derived *-thunk.S files
 
 $(SYMTAB_SRC): install
-	$(Q) $(APPDIR)$(DELIM)tools$(DELIM)mksymtab.sh $(ROMFS_DIR) g_nxflat >$@.tmp
+	$(Q) $(APPDIR)/tools/mksymtab.sh $(ROMFS_DIR) g_nxflat >$@.tmp
 	$(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)
 
 # Clean each subdirectory
diff --git a/examples/nxflat/tests/mkdirlist.sh b/examples/nxflat/tests/mkdirlist.sh
index 94e9f92..96f928c 100755
--- a/examples/nxflat/tests/mkdirlist.sh
+++ b/examples/nxflat/tests/mkdirlist.sh
@@ -19,7 +19,7 @@ fi
 
 echo "#include <stddef.h>"
 echo ""
-echo "static const char *dirlist[] ="
+echo "const char *dirlist[] ="
 echo "{"
 
 for file in `ls $dir`; do