From f052d9b4c24677bbb833e8ec7b3328aaa821aa79 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 23 Mar 2011 11:34:10 -0700 Subject: [PATCH] Calculate git-derived versions correctly when out-of-tree. --- Makefile.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4301f15fcd1..47ca147dd60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -407,8 +407,8 @@ endif boot/version.ml: $(MKFILES) @$(call E, git: $@) - $(Q)git log -1 \ - --pretty=format:'let version = "prerelease (%h %ci)";;' >$@ || exit 1 + $(Q)(cd $(S) && git log -1 \ + --pretty=format:'let version = "prerelease (%h %ci)";;') >$@ || exit 1 @@ -501,8 +501,8 @@ rustllvm/%.o: rustllvm/%.cpp $(MKFILES) ###################################################################### doc/version.texi: $(MKFILES) rust.texi - git log -1 \ - --pretty=format:'@macro gitversion%n%h %ci%n@end macro%n' >$@ + (cd $(S) && git log -1 \ + --pretty=format:'@macro gitversion%n%h %ci%n@end macro%n') >$@ doc/%.pdf: %.texi doc/version.texi texi2pdf -I doc -o $@ --clean $<