diff --git a/configure b/configure index 2e4cc087c14aee..48b40acf6d7e55 100755 --- a/configure +++ b/configure @@ -738,6 +738,13 @@ 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): + files = filter(lambda xs: xs[-3:] == '.js', files) + 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': [