diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-07-24 21:30:43 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-07-24 21:34:51 -0700 |
| commit | 53543d2aa36608966acda7a49276d7746df8ea3b (patch) | |
| tree | 076cc6c9ef5dcb8ec35ce8268f5c8c3071e4cfcb | |
| parent | 71f8db5b629cc6f74cd2894ed55fdbab07f9581c (diff) | |
| download | rust-53543d2aa36608966acda7a49276d7746df8ea3b.tar.gz rust-53543d2aa36608966acda7a49276d7746df8ea3b.zip | |
mk: Some fixes to grammar.mk
Invoke rustc in a way that sets LD_LIBRARY_PATH, and disable the deps on RustLexer.class when antlr isn't available.
| -rw-r--r-- | mk/grammar.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/grammar.mk b/mk/grammar.mk index c0afa3eb769..6ff0f82293b 100644 --- a/mk/grammar.mk +++ b/mk/grammar.mk @@ -13,7 +13,7 @@ SG = $(S)src/grammar/ B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/ L = $(B)lib/rustlib/$(CFG_BUILD)/lib LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/ -RUSTC = $(B)bin/rustc +RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) # Run the reference lexer against libsyntax and compare the tokens and spans. # If "// ignore-lexer-test" is present in the file, it will be ignored. @@ -37,19 +37,25 @@ $(BG)RustLexer.class: $(SG)RustLexer.g4 $(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-lexer: $(BG) $(BG)RustLexer.class $(BG)verify ifdef CFG_JAVAC ifdef CFG_ANTLR4 ifdef CFG_GRUN +check-lexer: $(BG) $(BG)RustLexer.class $(BG)verify $(info Verifying libsyntax against the reference lexer ...) $(Q)$(SG)check.sh $(S) "$(BG)" \ "$(CFG_GRUN)" "$(BG)verify" "$(BG)RustLexer.tokens" else $(info grun not available, skipping lexer test...) +check-lexer: + endif else $(info antlr4 not available, skipping lexer test...) +check-lexer: + endif else $(info javac not available, skipping lexer test...) +check-lexer: + endif |
