fix(make): make 'regen-apis' work

Thanks to changes in mako libraries, it won't work anymore without
the template directory set
This commit is contained in:
Sebastian Thiel
2015-03-12 11:21:58 +01:00
parent b8956103d9
commit 97b2649094
3 changed files with 8 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
<!---
DO NOT EDIT !
This file was generated automatically from 'src/mako/LICENSE.md.mako'
DO NOT EDIT !
-->
The MIT License (MIT)
=====================

View File

@@ -20,7 +20,7 @@ API_LIST = etc/api/api-list.yaml
API_JSON_FILES = $(shell find etc -type f -name '*-api.json')
MAKO_LIB_DIR = $(MAKO_SRC)/lib
MAKO_LIB_FILES = $(shell find $(MAKO_LIB_DIR) -type f -name '*.*')
MAKO = PYTHONPATH=$(MAKO_LIB_DIR) $(TPL)
MAKO = PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.'
MAKO_STANDARD_DEPENDENCIES = $(API_SHARED_INFO) $(MAKO_LIB_FILES) $(MAKO_RENDER)
help:
@@ -46,7 +46,7 @@ $(PYTHON):
$(MAKO_RENDER): $(PYTHON)
$(API_DEPS): $(API_DEPS_TPL) $(MAKO_STANDARD_DEPENDENCIES) $(API_LIST)
$(MAKO) --template-dir '.' -io $(API_DEPS_TPL)=$@ --data-files $(API_SHARED_INFO) $(API_LIST)
$(MAKO) -io $(API_DEPS_TPL)=$@ --data-files $(API_SHARED_INFO) $(API_LIST)
api-deps: $(API_DEPS)

View File

@@ -36,7 +36,7 @@
for i in api.templates]
api_json = directories.api_base + '/' + an + '/' + version + '/' + an + '-api.json'
api_json_overrides = os.path.dirname(api_json) + '/' + an + '-api_overrides.json'
api_json_inputs = api_json
api_json_inputs = api_json + ' $(API_SHARED_INFO)'
if os.path.isfile(api_json_overrides):
api_json_inputs += ' ' + api_json_overrides
api_info.append((api_name, api_clean, api_cargo, api_doc, gen_root))