diff options
author | syn <isaqtm@gmail.com> | 2021-02-10 23:19:10 +0300 |
---|---|---|
committer | syn <isaqtm@gmail.com> | 2021-02-10 23:19:10 +0300 |
commit | fe72c896a648cfff14bc1b606bcc486ccba0fc22 (patch) | |
tree | 801ef9a7ec1df24240a23c861e37381120a31bb0 /src/makefile | |
parent | b666618a881a4acade77b3d9885a4d2b6f75f812 (diff) | |
download | tdlib-autogen-fe72c896a648cfff14bc1b606bcc486ccba0fc22.tar.gz |
New generating code
Diffstat (limited to 'src/makefile')
-rw-r--r-- | src/makefile | 15 |
1 files changed, 15 insertions, 0 deletions
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) |