summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2012-05-24 00:56:24 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2013-06-04 10:11:08 +0100
commitce39c2e04ced177747d02de83f61989dcbcca44e (patch)
tree16909074f9dee8e21892cd9bd5e25849e369ec89 /Makefile
parentfb99070303e8e8af4438c0bad76d459af80d3bba (diff)
downloadgit-ce39c2e04ced177747d02de83f61989dcbcca44e.tar.gz
Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus implementing the request in issue #5. Acked-by: Heiko Voigt <hvoigt@hvoigt.net> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 985598b014..7ba8640e18 100644
--- a/Makefile
+++ b/Makefile
@@ -1529,6 +1529,7 @@ ifndef V
QUIET_MSGFMT = @echo ' ' MSGFMT $@;
QUIET_GCOV = @echo ' ' GCOV $@;
QUIET_SP = @echo ' ' SP $<;
+ QUIET_RC = @echo ' ' RC $@;
QUIET_SUBDIR0 = +@subdir=
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
$(MAKE) $(PRINT_DIR) -C $$subdir
@@ -1774,6 +1775,11 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
$(QUIET_GEN)$(cmd_munge_script) && \
mv $@+ $@
+git.res: git.rc
+ $(QUIET_RC)$(RC) \
+ $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst ., ,$(GIT_VERSION)))) \
+ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+
ifndef NO_PERL
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
@@ -2474,7 +2480,7 @@ profile-clean:
$(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
clean: profile-clean coverage-clean
- $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \
+ $(RM) *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \
builtin/*.o $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)