| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 89fdfde commit 22e9736
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -181,9 +181,19 @@ def files(options, action): | |||
| 181 | 181 | link_path = abspath(options.install_path, 'lib/libnode.so') | |
| 182 | 182 | try_symlink(options, so_name, link_path) | |
| 183 | 183 | else: | |
| 184 | - output_lib = 'libnode.' + options.variables.get('shlib_suffix') | ||
| 185 | - action(options, [os.path.join(options.build_dir, output_lib)], | ||
| 186 | - os.path.join(options.variables.get('libdir'), output_lib)) | ||
| 184 | + # Ninja and Makefile generators output the library in different directories; | ||
| 185 | + # find out which one we have, and install first found | ||
| 186 | + output_lib_name = 'libnode.' + options.variables.get('shlib_suffix') | ||
| 187 | + output_lib_candidate_paths = [ | ||
| 188 | + os.path.join(options.build_dir, output_lib_name), | ||
| 189 | + os.path.join(options.build_dir, "lib", output_lib_name), | ||
| 190 | + ] | ||
| 191 | + try: | ||
| 192 | + output_lib = next(filter(os.path.exists, output_lib_candidate_paths)) | ||
| 193 | + except StopIteration as not_found: | ||
| 194 | + raise RuntimeError("No libnode.so to install!") from not_found | ||
| 195 | + action(options, [output_lib], | ||
| 196 | + os.path.join(options.variables.get('libdir'), output_lib_name)) | ||
| 187 | 197 | ||
| 188 | 198 | action(options, [os.path.join(options.v8_dir, 'tools/gdbinit')], 'share/doc/node/') | |
| 189 | 199 | action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments