From 8f5774067484ab7fd4c1b41c8616661856262484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20K=C3=B6pcke?= Date: Fri, 12 Jul 2024 16:55:55 +0200 Subject: [PATCH] add makefile to build antlr files (#47) * add makefile to build antlr files * Add common g4 --- Makefile | 19 +++++++++++++++++++ riptide.yml | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9021525 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +# Makefile for generating files. +# Does NOT install the Python package or dependencies. +# Make sure to install those first. +# Make sure the Antlr4 version used matches the one of the runtime package! + +.PHONY := all exps ssbscript +.DEFAULT_GOAL := all + +explorerscript/antlr/ExplorerScript.interp explorerscript/antlr/ExplorerScript.tokens explorerscript/antlr/ExplorerScriptLexer.interp explorerscript/antlr/ExplorerScriptLexer.py explorerscript/antlr/ExplorerScriptLexer.tokens explorerscript/antlr/ExplorerScriptListener.py explorerscript/antlr/ExplorerScriptParser.py explorerscript/antlr/ExplorerScriptVisitor.py: explorerscript/antlr/ExplorerScript.g4 explorerscript/antlr/SsbCommon.g4 + cd explorerscript/antlr && antlr4 -Dlanguage=Python3 -visitor ExplorerScript.g4 + +explorerscript/antlr/SsbScript.interp explorerscript/antlr/SsbScript.tokens explorerscript/antlr/SsbScriptLexer.interp explorerscript/antlr/SsbScriptLexer.py explorerscript/antlr/SsbScriptLexer.tokens explorerscript/antlr/SsbScriptListener.py explorerscript/antlr/SsbScriptParser.py: explorerscript/antlr/SsbScript.g4 explorerscript/antlr/SsbCommon.g4 + cd explorerscript/antlr && antlr4 -Dlanguage=Python3 SsbScript.g4 + +exps: explorerscript/antlr/ExplorerScriptParser.py + +ssbscript: explorerscript/antlr/SsbScriptParser.py + +all: exps ssbscript diff --git a/riptide.yml b/riptide.yml index 844fe32..d5c8554 100644 --- a/riptide.yml +++ b/riptide.yml @@ -8,4 +8,6 @@ project: environment: REQUIREMENTS_FILE: "requirements-docs.txt" SPHINX_SOURCE: docs - SPHINX_BUILD: docs/build \ No newline at end of file + SPHINX_BUILD: docs/build + commands: + make: $remove \ No newline at end of file