aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-03 00:27:33 -0700
committerGraydon Hoare <[email protected]>2010-07-03 00:27:33 -0700
commitdf0fa603d091eb92e9ce7d2be969ae78a11057e2 (patch)
tree6ce0b17ca8366bd1fca560b4ca33f7dffb0a16cb /src/Makefile
parentHey, what's a coding sprint without an uncovered register allocation bug? No ... (diff)
downloadrust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.tar.xz
rust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.zip
Add version-stamp machinery (and put "Draft + datestamp" into doc footer).
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index fa02a2a2..93cb0b11 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -209,7 +209,7 @@ endif
# List them in link order.
# Nobody calculates the link-order DAG automatically, sadly.
-UTIL_BOT_MLS := $(addprefix boot/util/, fmt.ml common.ml bits.ml)
+UTIL_BOT_MLS := $(addprefix boot/util/, version.ml fmt.ml common.ml bits.ml)
DRIVER_BOT_MLS := $(addprefix boot/driver/, session.ml)
BE_MLS := $(addprefix boot/be/, x86.ml ra.ml pe.ml elf.ml \
macho.ml)
@@ -256,10 +256,16 @@ STDLIB_INPUTS := $(wildcard lib/*.rc lib/*.rs lib/*/*.rs)
COMPILER_CRATE := comp/rustc.rc
COMPILER_INPUTS := $(wildcard comp/*.rc comp/*.rs comp/*/*.rs)
-all: $(CFG_COMPILER) $(MKFILES) boot/fe/lexer.ml
+GENERATED := boot/fe/lexer.ml boot/util/version.ml
+
+all: $(CFG_COMPILER) $(MKFILES) $(GENERATED)
+
+boot/util/version.ml: Makefile
+ $(CFG_QUIET)git log -1 \
+ --format='let version = "prerelease (%h %ci)";;' >$@
loc:
- wc -l $(BOOT_MLS) $(RUNTIME_CS) $(RUNTIME_HDR)
+ $(CFG_QUIET)wc -l $(BOOT_MLS) $(RUNTIME_CS) $(RUNTIME_HDR)
$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR)
@$(call CFG_ECHO, compile: $<)
@@ -742,7 +748,7 @@ tidy:
$(CFG_QUIET) python etc/tidy.py \
$(wildcard ../*.txt) \
../README \
- $(filter-out boot/fe/lexer.ml $(PKG_3RDPARTY), $(PKG_FILES))
+ $(filter-out $(GENERATED) $(PKG_3RDPARTY), $(PKG_FILES))
clean:
@$(call CFG_ECHO, cleaning)
@@ -750,7 +756,7 @@ clean:
$(CFG_QUIET)rm -f $(BOOT_CMOS) $(BOOT_CMIS) $(BOOT_CMXS) $(BOOT_OBJS)
$(CFG_QUIET)rm -f $(CFG_COMPILER)
$(CFG_QUIET)rm -f $(ML_DEPFILES) $(C_DEPFILES) $(CRATE_DEPFILES)
- $(CFG_QUIET)rm -f boot/fe/lexer.ml
+ $(CFG_QUIET)rm -f $(GENERATED)
$(CFG_QUIET)rm -f $(CFG_BOOT) $(CFG_RUNTIME) $(CFG_STDLIB)
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_X86) $(TEST_RPASS_OUTS_X86)
$(CFG_QUIET)rm -f $(TEST_RPASS_EXES_LLVM) $(TEST_RPASS_OUTS_LLVM)