From fe72c896a648cfff14bc1b606bcc486ccba0fc22 Mon Sep 17 00:00:00 2001 From: syn Date: Wed, 10 Feb 2021 23:19:10 +0300 Subject: New generating code --- src/makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/makefile (limited to 'src/makefile') diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..4899cc2 --- /dev/null +++ b/src/makefile @@ -0,0 +1,15 @@ +DEFAULT_ENV = gen-env8 + +VENV ?= $(shell pwd)/$(DEFAULT_ENV) +PYTHON = VIRTUAL_ENV=$(VIRTUAL_ENV) $(VENV)/bin/python3 + +all: core messaging + +core: venv + $(PYTHON) generate.py --target targets/core.json | rustfmt > core.rs + +messaging: venv + $(PYTHON) generate.py | rustfmt > messaging.rs + +venv: + [ -d $(VENV) ] || (python3 -m venv $(DEFAULT_ENV) && VIRTUAL_ENV=$(VENV) $(VENV)/bin/pip install lark-parser) -- cgit v1.2.1-18-gbd029