Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jBarz committed Aug 29, 2017
1 parent a2e5bcc commit 6f9b1fd
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,37 +254,24 @@ function configure (gyp, argv, callback) {
// - the out/Debug directory
// - the root directory
var node_exp_file = undefined
if (process.platform === 'aix') {
if (process.platform === 'aix' || process.platform === 'os390') {
var ext = process.platform === 'aix' ? 'exp' : 'x'
var node_root_dir = findNodeDirectory()
var candidates = ['include/node/node.exp',
'out/Release/node.exp',
'out/Debug/node.exp',
'node.exp']
var candidates = ['include/node/node',
'out/Release/node',
'out/Debug/node',
'node'].map((file) => {
return `${file}.${ext}`
})
var logprefix = 'find exports file'
node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates)
if (node_exp_file !== undefined) {
log.verbose(logprefix, 'Found exports file: %s', node_exp_file)
} else {
var msg = msgFormat('Could not find node.exp file in %s', node_root_dir)
var msg = msgFormat(`Could not find node.${ext} file in %s`, node_root_dir)
log.error(logprefix, 'Could not find exports file')
return callback(new Error(msg))
}
} else if (process.platform === 'os390') {
var node_root_dir = findNodeDirectory()
var candidates = ['include/node/node.x',
'out/Release/node.x',
'out/Debug/node.x',
'node.x']
for (var next = 0; next < candidates.length; next++) {
node_exp_file = path.resolve(node_root_dir, candidates[next])
try {
fs.accessSync(node_exp_file, fs.R_OK)
// exp file found, stop looking
break
} catch (_) {
// this candidate was not found or not readable, do nothing
}
}
}

// this logic ported from the old `gyp_addon` python file
Expand Down

0 comments on commit 6f9b1fd

Please sign in to comment.