]> git.lizzy.rs Git - rust.git/commitdiff
mk: Some fixes to grammar.mk
authorBrian Anderson <banderson@mozilla.com>
Fri, 25 Jul 2014 04:30:43 +0000 (21:30 -0700)
committerBrian Anderson <banderson@mozilla.com>
Fri, 25 Jul 2014 04:34:51 +0000 (21:34 -0700)
Invoke rustc in a way that sets LD_LIBRARY_PATH,
and disable the deps on RustLexer.class when antlr isn't available.

mk/grammar.mk

index c0afa3eb769461853346cc7b031c4fa4b2c7d59b..6ff0f82293b13599c98fd05eab7360bce2ae4be8 100644 (file)
@@ -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