OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 GRAMMAR=../../docs/language/Dart.g |
| 6 JAVA_PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin |
| 7 JAVA=$(JAVA_PATH)/java |
| 8 JAVAC=javac |
| 9 ANTLR_JAR=/usr/share/java/antlr3-runtime.jar |
| 10 ANTLR_FILES=DartLexer.java DartParser.java Dart.tokens |
| 11 ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr3 -dfa -fo . $< |
| 12 JAVA_FILES=DartLexer.java DartParser.java |
| 13 CLASS_FILES=SpecParser.class SpecParserRunner.class DartLexer.class DartParser.c
lass |
| 14 |
| 15 .PHONY: default parser clean touch parse_hello |
| 16 |
| 17 default: $(JAVA_FILES) |
| 18 |
| 19 parser: SpecParser.class |
| 20 |
| 21 SpecParser.class: $(ANTLR_FILES) SpecParser.java |
| 22 $(JAVAC) -cp .:$(ANTLR_JAR) SpecParser.java |
| 23 |
| 24 %Lexer.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD) |
| 25 |
| 26 %Parser.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD) |
| 27 |
| 28 %.tokens: ../../docs/language/%.g Makefile ; $(ANTLR_CMD) |
| 29 |
| 30 clean: |
| 31 rm -f $(CLASS_FILES) $(ANTLR_FILES) |
| 32 |
| 33 touch: |
| 34 touch $(GRAMMAR) |
OLD | NEW |