aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar nnoble <nnoble@google.com>2015-01-05 17:15:18 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2015-01-06 17:40:30 -0800
commitc87b1c533f84a9bed94143908b00b0cc498cfda5 (patch)
tree955f1b80d920b0de22151bd21cb628ee5a331555 /templates
parentb3e3317ae8f4f760b8ecf73ccff11261192a795d (diff)
Adding plugins to the mako rendering system.
Change on 2015/01/05 by nnoble <nnoble@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83302581
Diffstat (limited to 'templates')
-rw-r--r--templates/Makefile.template45
-rw-r--r--templates/vsprojects/vs2013/grpc_unsecure.vcxproj.template2
2 files changed, 3 insertions, 44 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template
index ccf0678b35..5b00c3c46b 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -1,10 +1,9 @@
# GRPC global makefile
# This currently builds C and C++ code.
<%!
- from copy import deepcopy
import re
- proto_re = re.compile('(.*)\.proto')
+ proto_re = re.compile('(.*)\\.proto')
def excluded(filename, exclude_res):
for r in exclude_res:
@@ -19,48 +18,6 @@
return 'gens/' + m.group(1) + '.pb.cc'
%>
-<%
- altlibs = []
- for lib in libs:
- for alt in lib.get('alternates', []):
- new = deepcopy(lib)
- new.name = alt.name
- new.alternates = []
- exclude_res = [re.compile(str) for str in alt.get('exclude_res', [])]
-
- src = [file for file in new.get('src', []) if not excluded(file, exclude_res)]
- src.extend(alt.get('include_src', []))
- new.src = src
-
- headers = [file for file in new.get('headers', []) if not excluded(file, exclude_res)]
- headers.extend(alt.get('include_headers', []))
- new.headers = headers
-
- public_headers = [file for file in new.get('public_headers', []) if not excluded(file, exclude_res)]
- public_headers.extend(alt.get('include_public_headers', []))
- new.public_headers = public_headers
-
- for prop in alt.properties:
- new[prop.name] = prop.value
-
- altlibs.append(new)
- libs.extend(altlibs)
-
- protos = set()
- for lib in libs:
- for src in lib.src:
- m = proto_re.match(src)
- if m:
- protos.add(m.group(1))
- for tgt in targets:
- for src in tgt.src:
- m = proto_re.match(src)
- if m:
- protos.add(m.group(1))
-
- protos = sorted(protos)
-%>
-
# General settings.
# You may want to change these depending on your system.
diff --git a/templates/vsprojects/vs2013/grpc_unsecure.vcxproj.template b/templates/vsprojects/vs2013/grpc_unsecure.vcxproj.template
new file mode 100644
index 0000000000..3de6453f52
--- /dev/null
+++ b/templates/vsprojects/vs2013/grpc_unsecure.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc', libs, targets)} \ No newline at end of file