From 879bc4f24e524e53477e6954d254a79eeb92d267 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 5 Nov 2015 10:35:04 -0800 Subject: Generate all file lists and build target lists in binding.gyp from build.yaml --- templates/binding.gyp.template | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'templates') diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 52070cf6e9..be80750eb7 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -89,8 +89,9 @@ ] }, 'targets': [ + % for module in node_modules: % for lib in libs: - % if lib.name == 'gpr' or lib.name == 'grpc': + % if lib.name in module.transitive_deps: { 'target_name': '${lib.name}', 'product_prefix': 'lib', @@ -142,22 +143,18 @@ } }] ], - "target_name": "grpc_node", + "target_name": "${module.name}", "sources": [ - "src/node/ext/byte_buffer.cc", - "src/node/ext/call.cc", - "src/node/ext/call_credentials.cc", - "src/node/ext/channel.cc", - "src/node/ext/channel_credentials.cc", - "src/node/ext/completion_queue_async_worker.cc", - "src/node/ext/node_grpc.cc", - "src/node/ext/server.cc", - "src/node/ext/server_credentials.cc", - "src/node/ext/timeval.cc" + % for source in module.src: + "${source}", + % endfor ], "dependencies": [ - "grpc" + % for dep in getattr(module, 'deps', []): + "${dep}", + % endfor ] - } + }, + % endfor ] } -- cgit v1.2.3