-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (28 loc) · 727 Bytes
/
Copy pathmakefile
File metadata and controls
38 lines (28 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
INPUT_FILES = tmp/output.csv example/input.py example/second.py example/simple.py
all:
.PHONY: build
build: tmp/antlr
mkdir -p tmp/build
cd tmp/build ; cmake ../.. ; make
.PHONY: run
run: build
tmp/build/antlr_python_parser ${INPUT_FILES}
.PHONY: dev
dev: _clear run
.PHONY: antlr_force
antlr_force: tmp
mkdir -p tmp/antlr
cp Python3.g4 tmp/antlr/Python3.g4
cd tmp/antlr ; java -jar /usr/local/lib/antlr-4.9-complete.jar -Dlanguage=Cpp Python3.g4 -visitor
tmp/antlr: tmp
mkdir -p tmp/antlr
cp Python3.g4 tmp/antlr/Python3.g4
cd tmp/antlr ; java -jar /usr/local/lib/antlr-4.9-complete.jar -Dlanguage=Cpp Python3.g4 -visitor
.PHONY: _clear
_clear:
@clear
tmp:
mkdir -p tmp
.PHONY: clean
clean:
rm -rf antlr