mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
zos: support platform
Initial work to add z/OS support to node-gyp. PR-URL: https://github.com/nodejs/node-gyp/pull/1276 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
90d86512f4
commit
b2024dee7b
6 changed files with 69 additions and 12 deletions
|
@ -254,18 +254,21 @@ 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(function(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.%s file in %s', ext, node_root_dir)
|
||||
log.error(logprefix, 'Could not find exports file')
|
||||
return callback(new Error(msg))
|
||||
}
|
||||
|
@ -294,7 +297,7 @@ function configure (gyp, argv, callback) {
|
|||
argv.push('-Dlibrary=shared_library')
|
||||
argv.push('-Dvisibility=default')
|
||||
argv.push('-Dnode_root_dir=' + nodeDir)
|
||||
if (process.platform === 'aix') {
|
||||
if (process.platform === 'aix' || process.platform === 'os390') {
|
||||
argv.push('-Dnode_exp_file=' + node_exp_file)
|
||||
}
|
||||
argv.push('-Dnode_gyp_dir=' + nodeGypDir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue