GeezerVison is showing github.com — build: enable zoslib installation on z/OS · nodejs/node@5e4fc04
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: common.gypi +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
621 | 621 | 'ldflags': [ |
622 | 622 | '-q64', |
623 | 623 | ], |
| 624 | + # for addons due to v8config.h include of "zos-base.h": |
| 625 | + 'include_dirs': ['$(ZOSLIB_INCLUDES)'], |
624 | 626 | }], |
625 | 627 | ], |
626 | 628 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/install.py +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -186,6 +186,12 @@ def wanted_v8_headers(files_arg, dest): |
186 | 186 | files_arg = [name for name in files_arg if name in v8_headers] |
187 | 187 | action(files_arg, dest) |
188 | 188 |
|
| 189 | + def wanted_zoslib_headers(files_arg, dest): |
| 190 | + import glob |
| 191 | + zoslib_headers = glob.glob(zoslibinc + '/*.h') |
| 192 | + files_arg = [name for name in files_arg if name in zoslib_headers] |
| 193 | + action(files_arg, dest) |
| 194 | + |
189 | 195 | action([ |
190 | 196 | 'common.gypi', |
191 | 197 | 'config.gypi', |
@@ -220,6 +226,14 @@ def wanted_v8_headers(files_arg, dest): |
220 | 226 | 'deps/zlib/zlib.h', |
221 | 227 | ], 'include/node/') |
222 | 228 |
|
| 229 | + if sys.platform == 'zos': |
| 230 | + zoslibinc = os.environ.get('ZOSLIB_INCLUDES') |
| 231 | + if not zoslibinc: |
| 232 | + raise RuntimeError('Environment variable ZOSLIB_INCLUDES is not set\n') |
| 233 | + if not os.path.isfile(zoslibinc + '/zos-base.h'): |
| 234 | + raise RuntimeError('ZOSLIB_INCLUDES is not set to a valid location\n') |
| 235 | + subdir_files(zoslibinc, 'include/node/zoslib/', wanted_zoslib_headers) |
| 236 | + |
223 | 237 | def run(args): |
224 | 238 | global node_prefix, install_path, target_defaults, variables |
225 | 239 |
|
|