fixup! mingw: include the full version information in the resources

The previous attempts to fix this were all piecemeal, let's just try to
ignore everything that is not a digit. Yes, sure, v2.10.0-rc2.windows.1
gets the bogus patchlevel 2 (because of -rc2), but there is not really
anything we can do about that, given that the .rc only allows to use
four numbers to describe the version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2016-12-22 23:08:33 +01:00
parent 35ebda5da1
commit 7faecdd1fa

View File

@@ -1830,7 +1830,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
ifeq (,$(findstring .windows.,$(GIT_VERSION)))
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(subst .windows., ,$(GIT_VERSION)))))) -DPATCHLEVEL=0
else
RC_VERSION_DEFS := $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1,4,$(subst -, ,$(subst ., ,$(subst .rc, ,$(subst .windows., ,$(GIT_VERSION)))))))
RC_VERSION_DEFS = $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1,4,$(shell echo $(GIT_VERSION) | tr '.a-zA-Z-' ' ')))
endif
git.res: git.rc GIT-VERSION-FILE GIT-PREFIX