Handle missing git in build env.

This commit is contained in:
Graydon Hoare 2011-06-13 14:45:26 -07:00
parent eb811a903f
commit 0a8f9a394b
3 changed files with 6 additions and 3 deletions

View file

@ -49,10 +49,12 @@ CFG_RUSTCLIB :=$(call CFG_LIB_NAME,rustc)
# version-string calculation
CFG_GIT_DIR := $(CFG_SRC_DIR).git
CFG_VERSION := prerelease
ifneq ($(wildcard $(CFG_GIT)),)
ifneq ($(wildcard $(CFG_GIT_DIR)),)
CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
--pretty=format:'(%h %ci)')
endif
endif
ifdef CFG_DISABLE_VALGRIND
$(info cfg: disabling valgrind (CFG_DISABLE_VALGRIND))

2
configure vendored
View file

@ -193,11 +193,11 @@ putvar CFG_CPUTYPE
putvar CFG_CONFIGURE_ARGS
step_msg "looking for build programs"
probe_need CFG_GIT git
probe_need CFG_PERL perl
probe_need CFG_PYTHON python
probe_need CFG_CURL curl
probe CFG_GIT git
probe CFG_CLANG clang++
probe CFG_GCC gcc
probe CFG_LLVM_CONFIG llvm-config

View file

@ -3,8 +3,9 @@
######################################################################
doc/version.texi: $(MKFILES) rust.texi
(cd $(S) && git log -1 \
--pretty=format:'@macro gitversion%n%h %ci%n@end macro%n') >$@
echo "@macro gitversion" >$@
echo $(CFG_VERSION) >>$@
echo "@end macro" >>$@
doc/%.pdf: %.texi doc/version.texi
texi2pdf --batch -I doc -o $@ --clean $<