diff options
| author | Graydon Hoare <[email protected]> | 2011-05-06 11:21:51 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-05-06 11:21:51 -0700 |
| commit | 1e03f004047668e80ea4e1469addd0484ef48fbc (patch) | |
| tree | 852fa5123f4b03475a87a1930d98c3ab44532e3c /Makefile.in | |
| parent | Fix OS X build. (diff) | |
| download | rust-1e03f004047668e80ea4e1469addd0484ef48fbc.tar.xz rust-1e03f004047668e80ea4e1469addd0484ef48fbc.zip | |
Use #env to bake a git revision string into rustc's --version output.
Diffstat (limited to 'Makefile.in')
| -rw-r--r-- | Makefile.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 3daf9e8d..c32ac1e4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,6 +35,14 @@ CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt) CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm) CFG_STDLIB :=$(call CFG_LIB_NAME,std) +# version-string calculation +CFG_GIT_DIR := $(CFG_SRC_DIR).git +CFG_VERSION := prerelease +ifneq ($(wildcard $(CFG_GIT_DIR)),) + CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \ + --pretty=format:'(%h %ci)') +endif + ifdef CFG_OCAMLC_OPT $(info cfg: have ocaml native compiler) OPT=.opt @@ -140,6 +148,7 @@ SREQ2 := stage2/rustc$(X) $(LREQ) stage3/glue.o stage3/$(CFG_STDLIB) ###################################################################### export CFG_SRC_DIR +export CFG_VERSION ###################################################################### # Subprograms |