Skip to content

Commit f052d9b

Browse files
committed
Calculate git-derived versions correctly when out-of-tree.
1 parent d8d9adf commit f052d9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ endif
407407

408408
boot/version.ml: $(MKFILES)
409409
@$(call E, git: $@)
410-
$(Q)git log -1 \
411-
--pretty=format:'let version = "prerelease (%h %ci)";;' >$@ || exit 1
410+
$(Q)(cd $(S) && git log -1 \
411+
--pretty=format:'let version = "prerelease (%h %ci)";;') >$@ || exit 1
412412

413413

414414

@@ -501,8 +501,8 @@ rustllvm/%.o: rustllvm/%.cpp $(MKFILES)
501501
######################################################################
502502

503503
doc/version.texi: $(MKFILES) rust.texi
504-
git log -1 \
505-
--pretty=format:'@macro gitversion%n%h %ci%n@end macro%n' >$@
504+
(cd $(S) && git log -1 \
505+
--pretty=format:'@macro gitversion%n%h %ci%n@end macro%n') >$@
506506

507507
doc/%.pdf: %.texi doc/version.texi
508508
texi2pdf -I doc -o $@ --clean $<

0 commit comments

Comments
 (0)