source: proto/RE2PBS/Makefile @ 1171

Last change on this file since 1171 was 1171, checked in by ksherdy, 8 years ago

Update Makefile dependencies to chain targets.

File size: 1009 bytes
Line 
1GRAMMAR_NAME            = re2pbs
2CLASSPATH               = antlr/antlr-3.1.3.jar
3ANTLRWORKS_JAR          = antlr/antlrworks-1.4.2.jar
4RE2PBS_OUT_DIR          = bin
5RE2PBS_PROTO_FILE       = prototype.py
6RE2PBS_COMP_FILE        = compilable.py
7RE2PBS_DEF_FILE         = test/HexCharRefDef.txt
8RE2PBS_TEST_FILE        = test/CharRefTest.txt
9
10PABLO_SRC_FILE  = $(RE2PBS_COMP_FILE)
11PABLO_COMPILER  = ../Compiler/compiler2.py
12PABLO_TEMPLATE  = re2pbs_demo_template.cpp
13PABLO_OUT_FILE  = src/demo.cpp
14
15all:    pablo
16       
17proto:  re2pbs
18        python $(RE2PBS_PROTO_FILE) $(RE2PBS_TEST_FILE)
19
20pablo:  re2pbs
21        python $(PABLO_COMPILER) $(PABLO_SRC_FILE) -t $(PABLO_TEMPLATE) -o $(PABLO_OUT_FILE)
22
23re2pbs: grammar
24        python $(RE2PBS_OUT_DIR)/main.py $(RE2PBS_DEF_FILE)
25
26grammar: 
27        java -cp $(CLASSPATH) org.antlr.Tool -o $(RE2PBS_OUT_DIR) $(GRAMMAR_NAME).g
28
29ide:
30        java -jar $(ANTLRWORKS_JAR) 
31
32clean:
33        rm -f $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Lexer.py $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME)Parser.py $(RE2PBS_OUT_DIR)/$(GRAMMAR_NAME).tokens $(PABLO_OUT_FILE) $(RE2PBS_COMP_FILE) $(RE2PBS_PROTO_FILE)
34
Note: See TracBrowser for help on using the repository browser.