Skip to content

Commit 0a8f9a3

Browse files
committed
Handle missing git in build env.
1 parent eb811a9 commit 0a8f9a3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ CFG_RUSTCLIB :=$(call CFG_LIB_NAME,rustc)
4949
# version-string calculation
5050
CFG_GIT_DIR := $(CFG_SRC_DIR).git
5151
CFG_VERSION := prerelease
52+
ifneq ($(wildcard $(CFG_GIT)),)
5253
ifneq ($(wildcard $(CFG_GIT_DIR)),)
5354
CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
5455
--pretty=format:'(%h %ci)')
5556
endif
57+
endif
5658

5759
ifdef CFG_DISABLE_VALGRIND
5860
$(info cfg: disabling valgrind (CFG_DISABLE_VALGRIND))

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ putvar CFG_CPUTYPE
193193
putvar CFG_CONFIGURE_ARGS
194194

195195
step_msg "looking for build programs"
196-
probe_need CFG_GIT git
197196
probe_need CFG_PERL perl
198197
probe_need CFG_PYTHON python
199198
probe_need CFG_CURL curl
200199

200+
probe CFG_GIT git
201201
probe CFG_CLANG clang++
202202
probe CFG_GCC gcc
203203
probe CFG_LLVM_CONFIG llvm-config

mk/docs.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
######################################################################
44

55
doc/version.texi: $(MKFILES) rust.texi
6-
(cd $(S) && git log -1 \
7-
--pretty=format:'@macro gitversion%n%h %ci%n@end macro%n') >$@
6+
echo "@macro gitversion" >$@
7+
echo $(CFG_VERSION) >>$@
8+
echo "@end macro" >>$@
89

910
doc/%.pdf: %.texi doc/version.texi
1011
texi2pdf --batch -I doc -o $@ --clean $<

0 commit comments

Comments
 (0)