diff --git a/Makefile b/Makefile index 8fc89f48bf..0075022892 100644 --- a/Makefile +++ b/Makefile @@ -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 " > $(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)