Add tools to manage a version file

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3502 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-04-14 16:46:17 +00:00
parent f166caf9f0
commit e0aa4f2977
10 changed files with 514 additions and 131 deletions
+15 -1
View File
@@ -250,6 +250,20 @@ BIN = nuttx$(EXEEXT)
all: $(BIN)
.PHONY: context clean_context check_context subdir_clean clean subdir_distclean distclean
# Build the mkconfig tool used to create include/nuttx/config.h
tools/mkversion:
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion
$(TOPDIR)/.version:
@if [ ! -f .version ]; then \
echo "No .version file found, creating one"; \
tools/version.sh -v 0.0 -b 0 .version; \
fi
# Create the include/nuttx/version.h file
include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion
tools/mkversion $(TOPDIR) > include/nuttx/version.h
# Build the mkconfig tool used to create include/nuttx/config.h
tools/mkconfig:
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkconfig
@@ -290,7 +304,7 @@ endif
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip
context: check_context include/nuttx/config.h dirlinks
context: check_context include/nuttx/config.h include/nuttx/version.h dirlinks
@for dir in $(CONTEXTDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" context; \
done