about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-03-23 11:34:10 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-03-23 11:34:10 -0700
commitf052d9b4c24677bbb833e8ec7b3328aaa821aa79 (patch)
treebeb2ce32632eb90ae004edde3057f0d35c7c5fc7
parentd8d9adfbd6b49a1c07d7b2d0acff62b0f1b6505a (diff)
downloadrust-f052d9b4c24677bbb833e8ec7b3328aaa821aa79.tar.gz
rust-f052d9b4c24677bbb833e8ec7b3328aaa821aa79.zip
Calculate git-derived versions correctly when out-of-tree.
-rw-r--r--Makefile.in8
1 files 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 $<