From 3e4450e2376bb99da2ed5a3f0380044ce868e564 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 13 Dec 2019 12:34:17 -0600 Subject: [PATCH] tools/Makefile.unix and .win: Back out part of 1c91aec6ae77b49608741e5aa30b8b6876017934 (tools/ and fs/procfs: Simplify .version file generation). That change breaks the build if not in a git clone. noted by Nathan Hartman. --- tools/Makefile.unix | 8 +++++++- tools/Makefile.win | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/Makefile.unix b/tools/Makefile.unix index faf995efca..0bf9ce36d1 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -36,9 +36,15 @@ TOPDIR := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'} -include $(TOPDIR)/.config +-include $(TOPDIR)/.version include $(TOPDIR)/tools/Config.mk -include $(TOPDIR)/Make.defs +# In case .version file does not exist + +CONFIG_VERSION_STRING ?= "0.0" +CONFIG_VERSION_BUILD ?= "0" + # Control build verbosity # # V=1,2: Enable echo of commands @@ -263,7 +269,7 @@ tools/mkversion$(HOSTEXEEXT): $(TOPDIR)/.version: $(Q) echo "Create .version" - $(Q) tools/version.sh .version + $(Q) tools/version.sh -v $(CONFIG_VERSION_STRING) -b $(CONFIG_VERSION_BUILD) .version $(Q) chmod 755 .version include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion$(HOSTEXEEXT) diff --git a/tools/Makefile.win b/tools/Makefile.win index cca58957d0..8fbd1fe365 100644 --- a/tools/Makefile.win +++ b/tools/Makefile.win @@ -37,9 +37,17 @@ export SHELL=cmd TOPDIR := ${shell echo %CD%} -include $(TOPDIR)\.config +-include $(TOPDIR)/.version -include $(TOPDIR)\tools\Config.mk -include $(TOPDIR)\Make.defs +# In case .version file does not exist + +CONFIG_VERSION_STRING ?= "Unversioned" +CONFIG_VERSION_MAJOR ?= 0 +CONFIG_VERSION_MINOR ?= 0 +CONFIG_VERSION_BUILD ?= "0" + # Control build verbosity # # V=1,2: Enable echo of commands