You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/03/22 15:01:22 UTC
[incubator-nuttx-apps] 02/02: Call TESTANDREPLACEFILE instead of mv
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch pr134
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 6850f95f3b05ec524630f11eae45a1c8af67bf64
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Mar 22 22:19:20 2020 +0800
Call TESTANDREPLACEFILE instead of mv
to avoid the timestamp change even the content is same
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/elf/tests/Makefile | 2 +-
examples/module/drivers/Makefile | 17 ++---------------
examples/posix_spawn/filesystem/Makefile | 2 +-
3 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/examples/elf/tests/Makefile b/examples/elf/tests/Makefile
index 4c062e2..1f0c987 100644
--- a/examples/elf/tests/Makefile
+++ b/examples/elf/tests/Makefile
@@ -140,7 +140,7 @@ $(DIRLIST_HDR) : populate
$(SYMTAB_SRC): populate
$(Q) $(TESTS_DIR)/mksymtab.sh $(FSIMG_DIR) >$@.tmp
- $(Q) mv $@.tmp $@
+ $(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)
# Clean each subdirectory
diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile
index 9d054b7..7d255ce 100644
--- a/examples/module/drivers/Makefile
+++ b/examples/module/drivers/Makefile
@@ -94,16 +94,12 @@ ifeq ($(CONFIG_EXAMPLES_MODULE_ROMFS),y)
# Create the romfs.img file from the populated fsroot directory
$(ROMFS_IMG): populate
-ifeq ($(CONFIG_EXAMPLES_MODULE_BUILTINFS),y)
$(Q) genromfs -f $@ -d $(FSROOT_DIR) -V "MODULETEST"
-endif
# Create the romfs.h header file from the romfs.img file
$(FSIMG_HDR) : $(ROMFS_IMG)
-ifeq ($(CONFIG_EXAMPLES_MODULE_BUILTINFS),y)
$(Q) (cd $(DRIVER_DIR); xxd -i romfs.img | sed -e "s/^unsigned/static const unsigned/g" >$@)
-endif
else ifeq ($(CONFIG_EXAMPLES_MODULE_CROMFS),y)
# Make sure that the NuttX gencromfs tool has been built
@@ -117,22 +113,13 @@ $(FSIMG_HDR) : populate $(NXTOOLDIR)/$(GENCROMFSEXE)
$(Q) $(NXTOOLDIR)/$(GENCROMFSEXE) $(FSIMG_DIR) $(FSIMG_HDR)
endif
+endif
# Create the exported symbol table
$(SYMTAB_SRC): populate
$(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@.tmp
- $(Q) mv $@.tmp $@
-
-else
-
-# Create the exported symbol table
-
-$(SYMTAB_SRC): populate
- $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@.tmp
- $(Q) mv $@.tmp $@
-
-endif
+ $(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)
# Copy the symbol table into the kernel pass1/ build directory
diff --git a/examples/posix_spawn/filesystem/Makefile b/examples/posix_spawn/filesystem/Makefile
index 34c3e21..46e3c9b 100644
--- a/examples/posix_spawn/filesystem/Makefile
+++ b/examples/posix_spawn/filesystem/Makefile
@@ -79,7 +79,7 @@ $(ROMFS_HDR) : $(ROMFS_IMG)
$(SYMTAB_SRC): $(ROMFS_IMG)
$(Q) $(FILESYSTEM_DIR)$(DELIM)mksymtab.sh $(ROMFS_DIR) >$@.tmp
- $(Q) mv $@.tmp $@
+ $(Q) $(call TESTANDREPLACEFILE, $@.tmp, $@)
# Clean each subdirectory