From d3c84db09406ec15af03c0bb67d5b7703be4d7c6 Mon Sep 17 00:00:00 2001 From: Chris Dickinson Date: Fri, 23 Oct 2015 20:44:18 -0700 Subject: [PATCH 1/2] build: automatically generate list of library_files --- configure | 6 ++++++ node.gyp | 64 ------------------------------------------------------- 2 files changed, 6 insertions(+), 64 deletions(-) diff --git a/configure b/configure index 2e4cc087c14aee..1056a803e950be 100755 --- a/configure +++ b/configure @@ -738,6 +738,12 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + modules = ['src/node.js'] + o['variables']['library_files'] = modules + lib_dir = os.path.join(root_dir, 'lib') + for root, dirs, files in os.walk(lib_dir): + modules += map(lambda xs: os.path.join(root, xs)[2:], files) + if options.linked_module: o['variables']['library_files'] = options.linked_module diff --git a/node.gyp b/node.gyp index e63e750414ee60..5f618a84356426 100644 --- a/node.gyp +++ b/node.gyp @@ -14,70 +14,6 @@ 'node_v8_options%': '', 'node_target_type%': 'executable', 'node_core_target_name%': 'node', - 'library_files': [ - 'src/node.js', - 'lib/_debug_agent.js', - 'lib/_debugger.js', - 'lib/assert.js', - 'lib/buffer.js', - 'lib/child_process.js', - 'lib/console.js', - 'lib/constants.js', - 'lib/crypto.js', - 'lib/cluster.js', - 'lib/dgram.js', - 'lib/dns.js', - 'lib/domain.js', - 'lib/events.js', - 'lib/freelist.js', - 'lib/fs.js', - 'lib/http.js', - 'lib/_http_agent.js', - 'lib/_http_client.js', - 'lib/_http_common.js', - 'lib/_http_incoming.js', - 'lib/_http_outgoing.js', - 'lib/_http_server.js', - 'lib/https.js', - 'lib/_linklist.js', - 'lib/module.js', - 'lib/net.js', - 'lib/os.js', - 'lib/path.js', - 'lib/process.js', - 'lib/punycode.js', - 'lib/querystring.js', - 'lib/readline.js', - 'lib/repl.js', - 'lib/stream.js', - 'lib/_stream_readable.js', - 'lib/_stream_writable.js', - 'lib/_stream_duplex.js', - 'lib/_stream_transform.js', - 'lib/_stream_passthrough.js', - 'lib/_stream_wrap.js', - 'lib/string_decoder.js', - 'lib/sys.js', - 'lib/timers.js', - 'lib/tls.js', - 'lib/_tls_common.js', - 'lib/_tls_legacy.js', - 'lib/_tls_wrap.js', - 'lib/tty.js', - 'lib/url.js', - 'lib/util.js', - 'lib/v8.js', - 'lib/vm.js', - 'lib/zlib.js', - 'lib/internal/child_process.js', - 'lib/internal/freelist.js', - 'lib/internal/linkedlist.js', - 'lib/internal/module.js', - 'lib/internal/repl.js', - 'lib/internal/socket_list.js', - 'lib/internal/util.js', - 'lib/internal/streams/lazy_transform.js', - ], }, 'targets': [ From 7841bad12bc4730999064f365ba7f0e42aba09ab Mon Sep 17 00:00:00 2001 From: Chris Dickinson Date: Sat, 24 Oct 2015 12:02:35 -0700 Subject: [PATCH 2/2] squash! make sure the extname is ".js" --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 1056a803e950be..48b40acf6d7e55 100755 --- a/configure +++ b/configure @@ -742,6 +742,7 @@ def configure_node(o): o['variables']['library_files'] = modules lib_dir = os.path.join(root_dir, 'lib') for root, dirs, files in os.walk(lib_dir): + files = filter(lambda xs: xs[-3:] == '.js', files) modules += map(lambda xs: os.path.join(root, xs)[2:], files) if options.linked_module: