Skip to content

Commit ff0278b

Browse files
committed
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.
1 parent 9d20a46 commit ff0278b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

mk/grammar.mk

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,25 @@ endef
3030
$(BG):
3131
$(Q)mkdir -p $(BG)
3232

33-
$(BG)RustLexer.class: $(SG)RustLexer.g4
33+
$(BG)RustLexer.class: $(BG) $(SG)RustLexer.g4
3434
$(Q)$(CFG_ANTLR4) -o $(B)grammar $(SG)RustLexer.g4
3535
$(Q)$(CFG_JAVAC) -d $(BG) $(BG)RustLexer.java
3636

37-
$(BG)verify: $(SG)verify.rs rustc-stage2-H-$(CFG_BUILD) $(LD)stamp.regex_macros $(LD)stamp.rustc
38-
$(Q)$(RUSTC) -O --out-dir $(BG) -L $(L) $(SG)verify.rs
37+
check-build-lexer-verifier: $(BG)verify
38+
39+
ifeq ($(NO_REBUILD),)
40+
VERIFY_DEPS := rustc-stage2-H-$(CFG_BUILD) $(LD)stamp.regex_macros $(LD)stamp.rustc
41+
else
42+
VERIFY_DEPS :=
43+
endif
44+
45+
$(BG)verify: $(BG) $(SG)verify.rs $(VERIFY_DEPS)
46+
$(Q)$(RUSTC) --out-dir $(BG) -L $(L) $(SG)verify.rs
3947

4048
ifdef CFG_JAVAC
4149
ifdef CFG_ANTLR4
4250
ifdef CFG_GRUN
43-
check-lexer: $(BG) $(BG)RustLexer.class $(BG)verify
51+
check-lexer: $(BG) $(BG)RustLexer.class check-build-lexer-verifier
4452
$(info Verifying libsyntax against the reference lexer ...)
4553
$(Q)$(SG)check.sh $(S) "$(BG)" \
4654
"$(CFG_GRUN)" "$(BG)verify" "$(BG)RustLexer.tokens"

mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
199199

200200
# Some less critical tests that are not prone to breakage.
201201
# Not run as part of the normal test suite, but tested by bors on checkin.
202-
check-secondary: check-build-compiletest check-lexer check-pretty
202+
check-secondary: check-build-compiletest check-build-lexer-verifier check-lexer check-pretty
203203

204204
# check + check-secondary.
205205
#

0 commit comments

Comments
 (0)