fix(template-engine): removed gsl, added pyratemp

As GSL failed in my first attempt to get the example program going,
it might be better to try something else before too much time is spend.

Fortunately, pyratemp **seems** to be something usable, and even if not,
it might be possible to make it usable as it's just a 'simple'
python script that I might be able to understand, if need be.
This commit is contained in:
Sebastian Thiel
2015-03-01 13:24:01 +01:00
parent f2ca8c3fb7
commit e06738a7bd
8 changed files with 244 additions and 310 deletions

View File

@@ -3,30 +3,24 @@
include Makefile.helpers
PYTHON = python2.7
CONVERT = $(PYTHON) ./etc/bin/json2xml.py
GSL = ./etc/bin/gsl_$(OS)-$(ARCH) -q
TPL = etc/bin/pyratemp.py
API_DEPS = .api.deps
API_SHARED_XML = ./etc/api/shared.xml
API_SHARED_INFO = ./etc/api/shared.yml
API_JSON_FILES = $(shell find ./etc -type f -name '*-api.json')
API_XML_FILES = $(patsubst %.json,%.xml,$(API_JSON_FILES))
help:
$(info Programs)
$(info ----> GSL: '$(GSL)')
$(info ----> json2xml: '$(CONVERT)')
$(info ----> templat engine: '$(TPL)')
$(info )
$(info Targets)
$(info help - print this help)
$(info json-to-xml - convert json API files to xml for consumption by GSL)
$(info api-deps - generate a file to tell make what API file dependencies will be)
json-to-xml: $(API_XML_FILES)
$(API_DEPS): $(API_SHARED_XML)
$(GSL) -script:src/gsl/deps.gsl $(API_SHARED_XML)
%.xml: %.json
$(CONVERT) --pretty -o $@ < $<
$(API_DEPS): $(API_SHARED_INFO)
$(TPL) -f $(API_SHARED_INFO) -d DEP_FILE=$@
api-deps: $(API_DEPS)