Skip to content

Commit

Permalink
fix(make): make 'regen-apis' work
Browse files Browse the repository at this point in the history
Thanks to changes in mako libraries, it won't work anymore without
the template directory set
  • Loading branch information
Byron committed Mar 12, 2015
1 parent b895610 commit 97b2649
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -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)
=====================

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/mako/deps.mako
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 97b2649

Please sign in to comment.