build: renew "Build Time" whenever building a new image
This patch renews .version and version.h whenever building a new
tizenrt image.
@@ -229,7 +229,7 @@ BIN_EXE = tinyara$(EXEEXT)
BIN = $(BIN_DIR)/$(BIN_EXE)
all: $(BIN) memstat
-.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean
+.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean force_build
# Target used to copy include/tinyara/math.h. If CONFIG_ARCH_MATH_H is
# defined, then there is an architecture specific math.h header file
@@ -291,15 +291,15 @@ endif
# part of the overall TinyAra configuration sequence. Notice that the
# tools/mkversion tool is built and used to create include/tinyara/version.h
+force_build:
+
tools/mkversion$(HOSTEXEEXT):
$(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion$(HOSTEXEEXT)
-$(TOPDIR)/.version:
- $(Q) if [ ! -f .version ]; then \
- echo "No .version file found, creating one"; \
+$(TOPDIR)/.version: force_build
+ echo "create .version file"; \
tools/version.sh -v 1.0 .version; \
- chmod 755 .version; \
- fi
+ chmod 755 .version
include/tinyara/version.h: $(TOPDIR)/.version tools/mkversion$(HOSTEXEEXT)
$(Q) tools/mkversion $(TOPDIR) > include/tinyara/version.h
