about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-11-19 13:11:24 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-11-19 13:12:05 +1100
commitff0278bc152c5e3072434615cf9861e98a160e71 (patch)
tree14b66e24cae4ca708a760947c374a2bfb6ad7a7e
parent9d20a46799178df9d2fb28dfec95ba55cbfb7f9c (diff)
downloadrust-ff0278bc152c5e3072434615cf9861e98a160e71.tar.gz
rust-ff0278bc152c5e3072434615cf9861e98a160e71.zip
Update makefiles to ensure src/grammar/verify.rs is built.
It's not run, but this ensures that the code at least doesn't go out of
date.
-rw-r--r--mk/grammar.mk16
-rw-r--r--mk/tests.mk2
2 files changed, 13 insertions, 5 deletions
diff --git a/mk/grammar.mk b/mk/grammar.mk
index 12190fb0348..a9f45907b81 100644
--- a/mk/grammar.mk
+++ b/mk/grammar.mk
@@ -30,17 +30,25 @@ endef
 $(BG):
 	$(Q)mkdir -p $(BG)
 
-$(BG)RustLexer.class: $(SG)RustLexer.g4
+$(BG)RustLexer.class: $(BG) $(SG)RustLexer.g4
 	$(Q)$(CFG_ANTLR4) -o $(B)grammar $(SG)RustLexer.g4
 	$(Q)$(CFG_JAVAC) -d $(BG) $(BG)RustLexer.java
 
-$(BG)verify: $(SG)verify.rs rustc-stage2-H-$(CFG_BUILD) $(LD)stamp.regex_macros $(LD)stamp.rustc
-	$(Q)$(RUSTC) -O --out-dir $(BG) -L $(L) $(SG)verify.rs
+check-build-lexer-verifier: $(BG)verify
+
+ifeq ($(NO_REBUILD),)
+VERIFY_DEPS :=  rustc-stage2-H-$(CFG_BUILD) $(LD)stamp.regex_macros $(LD)stamp.rustc
+else
+VERIFY_DEPS :=
+endif
+
+$(BG)verify: $(BG) $(SG)verify.rs $(VERIFY_DEPS)
+	$(Q)$(RUSTC) --out-dir $(BG) -L $(L) $(SG)verify.rs
 
 ifdef CFG_JAVAC
 ifdef CFG_ANTLR4
 ifdef CFG_GRUN
-check-lexer: $(BG) $(BG)RustLexer.class $(BG)verify
+check-lexer: $(BG) $(BG)RustLexer.class check-build-lexer-verifier
 	$(info Verifying libsyntax against the reference lexer ...)
 	$(Q)$(SG)check.sh $(S) "$(BG)" \
 		"$(CFG_GRUN)" "$(BG)verify" "$(BG)RustLexer.tokens"
diff --git a/mk/tests.mk b/mk/tests.mk
index 4433d780ded..63a34e0f010 100644
--- a/mk/tests.mk
+++ b/mk/tests.mk
@@ -199,7 +199,7 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
 
 # Some less critical tests that are not prone to breakage.
 # Not run as part of the normal test suite, but tested by bors on checkin.
-check-secondary: check-build-compiletest check-lexer check-pretty
+check-secondary: check-build-compiletest check-build-lexer-verifier check-lexer check-pretty
 
 # check + check-secondary.
 #