Remove Build/git_version.* on each make

The Build/git_version.d and Build/git_version.o files need to be
removed on each make to prevent confusion from a previously
generated dependency file for a different target.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-05-27 19:50:39 -07:00
parent 35e0d866eb
commit 77cc3cdde1
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ endif
GIT_DESC_SHORT := $(shell echo $(GIT_DESC) | cut -c1-16)
$(shell mkdir -p $(BUILD_DIR))
$(shell rm -f $(BUILD_DIR)git_version.*)
$(shell echo "#include <systemlib/git_version.h>" > $(BUILD_DIR)git_version.c)
$(shell echo "const char* px4_git_version = \"$(GIT_DESC)\";" >> $(BUILD_DIR)git_version.c)
$(shell echo "const uint64_t px4_git_version_binary = 0x$(GIT_DESC_SHORT);" >> $(BUILD_DIR)git_version.c)