mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
feat(mako): mako autosetup and improved executable
Now we can write mako templates, with a similar feature set as pyratemp. Except that its syntax is nicer, allows to do everything and that there is syntax highlight support. Let's see how it fares
This commit is contained in:
24
Makefile
24
Makefile
@@ -2,11 +2,14 @@
|
||||
|
||||
include Makefile.helpers
|
||||
|
||||
PYTHON = python2.7
|
||||
TPL = etc/bin/pyratemp.py
|
||||
VENV := virtualenv
|
||||
VENV_DIR := .pyenv
|
||||
PYTHON := $(VENV_DIR)/bin/python
|
||||
PIP := $(VENV_DIR)/bin/pip
|
||||
MAKO_RENDER := ./etc/bin/mako-render
|
||||
TPL := $(PYTHON) $(MAKO_RENDER)
|
||||
|
||||
API_DEPS_TPL = src/pyra/deps.pyra
|
||||
API_MAIN_TPL = src/pyra/main.pyra
|
||||
API_DEPS_TPL = src/mako/deps.mako
|
||||
API_DEPS = .api.deps
|
||||
API_SHARED_INFO = ./etc/api/shared.yaml
|
||||
API_JSON_FILES = $(shell find ./etc -type f -name '*-api.json')
|
||||
@@ -20,14 +23,21 @@ help:
|
||||
$(info api-deps - generate a file to tell make what API file dependencies will be)
|
||||
$(info help-api - show all api targets to build individually)
|
||||
|
||||
$(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL)
|
||||
$(TPL) -f $(API_SHARED_INFO) $(API_DEPS_TPL) > $@
|
||||
$(PYTHON):
|
||||
virtualenv $(VENV_DIR)
|
||||
$(PIP) install mako pyyaml
|
||||
|
||||
$(MAKO_RENDER): $(PYTHON)
|
||||
|
||||
$(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL) $(MAKO_RENDER)
|
||||
$(TPL) --data-files $(API_SHARED_INFO) $(API_DEPS_TPL) > $@
|
||||
|
||||
api-deps: $(API_DEPS)
|
||||
|
||||
include $(API_DEPS)
|
||||
|
||||
clean: clean-api
|
||||
clean:
|
||||
-rm -Rf $(VENV_DIR)
|
||||
-rm $(API_DEPS)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user