fix(make): dependency handling:dirs with timestamp

That way, make will not regenerate unnecessarily
This commit is contained in:
Sebastian Thiel
2015-03-03 06:46:47 +01:00
parent d8edf1dcd4
commit bb04b60dc4
5 changed files with 17 additions and 13 deletions

View File

@@ -7,6 +7,7 @@
<%
import util
gen_root = directories.output + '/' + a.name + util.to_api_version(a.version)
gen_root_stamp = gen_root + '/.timestamp'
api_name = util.library_name(a.name, a.version)
api_clean = api_name + '-clean'
# source, destination of individual output files
@@ -16,10 +17,11 @@
api_json_inputs = api_json + " $(API_SHARED_INFO)"
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)
${gen_root_stamp}: ${' '.join(i[0] for i in sds)} ${api_json_inputs} $(MAKO_LIB_FILES) $(MAKO_RENDER)
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}
@touch $@
${api_name}: ${gen_root}
${api_name}: ${gen_root_stamp}
${api_clean}:
-rm -Rf ${gen_root}

View File

@@ -84,6 +84,8 @@ def to_rust_type(sn, pn, t, allow_optionals=True):
elif t.type == 'object':
rust_type = "%s<String, %s>" % (rust_type, nested_type(t))
is_pod = False
elif t.type == 'string' and 'Count' in pn:
rust_type = 'i64'
elif rust_type == USE_FORMAT:
rust_type = TYPE_MAP[t.format]
if is_pod and allow_optionals: