diff options
author | isaacs <i@izs.me> | 2013-02-06 08:39:27 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-02-06 08:39:31 -0800 |
commit | 5aef65a98a9427bcd6f41d8f65235bd26883d2d7 (patch) | |
tree | f1e290db817cedc3af49d6f6423ca7033cbdee18 /deps/npm/node_modules/node-gyp/lib/configure.js | |
parent | a86ebbe2885fe6f2b6adeeaa95c8abc12d821d7b (diff) | |
download | node-5aef65a98a9427bcd6f41d8f65235bd26883d2d7.tar.gz |
npm: Upgrade to v1.2.10
Diffstat (limited to 'deps/npm/node_modules/node-gyp/lib/configure.js')
-rw-r--r-- | deps/npm/node_modules/node-gyp/lib/configure.js | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 82de1e6ce..e3200998f 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -250,24 +250,20 @@ function configure (gyp, argv, callback) { , defaults = config.target_defaults , variables = config.variables - if (!defaults) { - defaults = config.target_defaults = {} - } - if (!variables) { - variables = config.variables = {} - } - if (!defaults.cflags) { - defaults.cflags = [] - } - if (!defaults.defines) { - defaults.defines = [] - } - if (!defaults.include_dirs) { - defaults.include_dirs = [] - } - if (!defaults.libraries) { - defaults.libraries = [] - } + // default "config.variables" + if (!variables) variables = config.variables = {} + + // default "config.defaults" + if (!defaults) defaults = config.target_defaults = {} + + // don't inherit the "defaults" from node's `process.config` object. + // doing so could cause problems in cases where the `node` executable was + // compiled on a different machine (with different lib/include paths) than + // the machine where the addon is being built to + defaults.cflags = [] + defaults.defines = [] + defaults.include_dirs = [] + defaults.libraries = [] // set the default_configuration prop if ('debug' in gyp.opts) { |