feat(mako-render): multiple input-outputs per call

That way, we read the data files only once, but produce all the outputs
we need. Together with a powerful makefile, we have a multi-invocation
with proper depedency tracking.
Everything will be regenerated though, even though just a single input
template file changed.

The alternative would be to have one dependency and invocation per
input dependency, but that will read the entire json each time.

Let's see what's faster/more useful during development.
This commit is contained in:
Sebastian Thiel
2015-03-01 17:44:02 +01:00
parent c3d399e91a
commit 087a0762ac
6 changed files with 77 additions and 33 deletions

View File

@@ -29,7 +29,7 @@ $(PYTHON):
$(MAKO_RENDER): $(PYTHON)
$(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL) $(MAKO_RENDER)
$(TPL) --data-files $(API_SHARED_INFO) --var SHARED_INFO_FILE=$(API_SHARED_INFO) $(API_DEPS_TPL) > $@
$(TPL) -io $(API_DEPS_TPL) --data-files $(API_SHARED_INFO) > $@
api-deps: $(API_DEPS)