mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-10 05:22:44 +01:00
feat(mako): mako-render generates output dirs
That way, the makefile doesn't need to know that much anymore, and gets simpler/less verbose. \# Also * Added filters for rust doc string * fixed .PHONY
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
api_info.append((api_name, api_clean, gen_root))
|
||||
%>\
|
||||
${gen_root}: ${' '.join(i[0] for i in sds)} ${api_json_inputs} $(MAKO_LIB_FILES) $(MAKO_RENDER)
|
||||
@mkdir -p $@
|
||||
PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.' --var OUTPUT_DIR=$@ -io ${' '.join("%s=%s" % (s, d) for s, d in sds)} --data-files ${api_json_inputs}
|
||||
|
||||
${api_name}: ${gen_root}
|
||||
@@ -28,7 +27,7 @@ ${api_clean}:
|
||||
-rm -Rf ${gen_root}
|
||||
% endfor
|
||||
|
||||
.PHONY += $(.PHONY) ${' '.join(a[0] for a in api_info)} ${' '.join(a[1] for a in api_info)}
|
||||
.PHONY += $(.PHONY) help-api clean-apis apis ${' '.join(a[0] for a in api_info)} ${' '.join(a[1] for a in api_info)}
|
||||
|
||||
help-api:
|
||||
$(info apis - make all APIs)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
|
||||
# rust module doc comment filter
|
||||
def rmdc(s):
|
||||
return '//! ' + s
|
||||
|
||||
# rust doc comment filter
|
||||
def rdc(s):
|
||||
return '/// ' + s
|
||||
|
||||
# Expects v to be 'v\d+', throws otherwise
|
||||
def to_api_version(v):
|
||||
assert len(v) >= 2 and v[0] == 'v'
|
||||
return v[1:]
|
||||
|
||||
Reference in New Issue
Block a user