Files
google-apis-rs/Makefile
Sebastian Thiel f2ca8c3fb7 fix(make): fixed dependencies
The make deps generator should only care about the shared xml
2015-03-01 11:54:44 +01:00

38 lines
911 B
Makefile

.PHONY: json-to-xml clean help api-deps
include Makefile.helpers
PYTHON = python2.7
CONVERT = $(PYTHON) ./etc/bin/json2xml.py
GSL = ./etc/bin/gsl_$(OS)-$(ARCH) -q
API_DEPS = .api.deps
API_SHARED_XML = ./etc/api/shared.xml
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 )
$(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_DEPS)
clean:
-rm $(API_DEPS)
-rm $(API_XML_FILES)