diff --git a/Makefile b/Makefile index f9837b090ef29b..eac79fc69abaab 100644 --- a/Makefile +++ b/Makefile @@ -1783,9 +1783,14 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES $(QUIET_GEN)$(cmd_munge_script) && \ mv $@+ $@ +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 .windows., ,$(GIT_VERSION)))))) +endif + git.res: git.rc GIT-VERSION-FILE GIT-PREFIX - $(QUIET_RC)$(RC) \ - $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \ + $(QUIET_RC)$(RC) $(RC_VERSION_DEFS) \ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ # This makes sure we depend on the NO_PERL setting itself. diff --git a/git.rc b/git.rc index 4aa4f9973ef917..cc3fdc6cc6cb83 100644 --- a/git.rc +++ b/git.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION MAJOR,MINOR,0,0 -PRODUCTVERSION MAJOR,MINOR,0,0 +FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL +PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL BEGIN BLOCK "StringFileInfo" BEGIN