all: grammars antlr4.jar: wget https://www.antlr.org/download/antlr-4.10.1-complete.jar mv antlr-4.10.1-complete.jar antlr4.jar python3 -m pip install antlr4-python3-runtime .PHONY: grammars grammars: grammars/__init__.py grammars/__init__.py: O.g4 antlr4.jar java -cp antlr4.jar org.antlr.v4.Tool -Dlanguage=Python3 $< -no-listener -visitor -o grammars touch grammars/__init__.py .PHONEY: clean clean: rm -rf grammars rm -f antlr4.jar