diff --git a/common.gypi b/common.gypi index 6f1a7a0e3c7f4d..1bf3a871349238 100644 --- a/common.gypi +++ b/common.gypi @@ -615,6 +615,8 @@ 'ldflags': [ '-q64', ], + # for addons due to v8config.h include of "zos-base.h": + 'include_dirs': ['$(ZOSLIB_INCLUDES)'], }], ], } diff --git a/tools/install.py b/tools/install.py index 5340ce38b9b17c..e51d1298559ad1 100755 --- a/tools/install.py +++ b/tools/install.py @@ -228,6 +228,12 @@ def wanted_v8_headers(files_arg, dest): files_arg = [name for name in files_arg if name in v8_headers] action(files_arg, dest) + def wanted_zoslib_headers(files_arg, dest): + import glob + zoslib_headers = glob.glob(zoslibinc + '/*.h') + files_arg = [name for name in files_arg if name in zoslib_headers] + action(files_arg, dest) + action([ 'common.gypi', 'config.gypi', @@ -262,6 +268,14 @@ def wanted_v8_headers(files_arg, dest): 'deps/zlib/zlib.h', ], 'include/node/') + if sys.platform == 'zos': + zoslibinc = os.environ.get('ZOSLIB_INCLUDES') + if not zoslibinc: + raise RuntimeError('Environment variable ZOSLIB_INCLUDES is not set\n') + if not os.path.isfile(zoslibinc + '/zos-base.h'): + raise RuntimeError('ZOSLIB_INCLUDES is not set to a valid location\n') + subdir_files(zoslibinc, 'include/node/zoslib/', wanted_zoslib_headers) + def run(args): global node_prefix, install_path, target_defaults, variables