]>
Commit | Line | Data |
---|---|---|
c2768f1e AM |
1 | From cf581096dd350cf7267e5a12ff26159120274c5c Mon Sep 17 00:00:00 2001 |
2 | From: Elliott Sales de Andrade <quantum.analyst@gmail.com> | |
3 | Date: Tue, 19 Mar 2019 23:22:40 -0400 | |
4 | Subject: [PATCH 2/3] Install both binaries and use libdir. | |
5 | ||
6 | This allows us to build with a shared library for other users while | |
7 | still providing the normal executable. | |
8 | ||
9 | Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> | |
10 | --- | |
11 | configure.py | 7 +++++++ | |
12 | tools/install.py | 29 +++++++++++++---------------- | |
13 | 2 files changed, 20 insertions(+), 16 deletions(-) | |
14 | ||
15 | diff --git a/configure.py b/configure.py | |
16 | index 20cce214dbb113aeef8f1044d7af88d842a11fd7..e2d78a2a51ef81621618cb20fa76f4a1421bf9e0 100755 | |
17 | --- a/configure.py | |
18 | +++ b/configure.py | |
19 | @@ -559,6 +559,12 @@ parser.add_option('--shared', | |
20 | help='compile shared library for embedding node in another project. ' + | |
21 | '(This mode is not officially supported for regular applications)') | |
22 | ||
2ae41f2b | 23 | +parser.add_argument('--libdir', |
c2768f1e AM |
24 | + action='store', |
25 | + dest='libdir', | |
26 | + default='lib', | |
27 | + help='a directory to install the shared library into') | |
28 | + | |
2ae41f2b | 29 | parser.add_argument('--without-v8-platform', |
c2768f1e AM |
30 | action='store_true', |
31 | dest='without_v8_platform', | |
32 | @@ -1103,6 +1109,7 @@ def configure_node(o): | |
713af70d JP |
33 | o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) |
34 | ||
c2768f1e AM |
35 | o['variables']['node_shared'] = b(options.shared) |
36 | + o['variables']['libdir'] = options.libdir | |
37 | node_module_version = getmoduleversion.get_version() | |
38 | ||
713af70d | 39 | if options.dest_os == 'android': |
c2768f1e AM |
40 | diff --git a/tools/install.py b/tools/install.py |
41 | index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..fe4723bf15012c8aacacb0393dc8294c049b0503 100755 | |
42 | --- a/tools/install.py | |
43 | +++ b/tools/install.py | |
ec0ca276 | 44 | @@ -121,22 +121,19 @@ def subdir_files(path, dest, action): |
c2768f1e AM |
45 | |
46 | def files(action): | |
47 | is_windows = sys.platform == 'win32' | |
48 | - output_file = 'node' | |
49 | output_prefix = 'out/Release/' | |
50 | + output_libprefix = output_prefix | |
51 | ||
52 | - if 'false' == variables.get('node_shared'): | |
53 | - if is_windows: | |
54 | - output_file += '.exe' | |
55 | + if is_windows: | |
56 | + output_bin = 'node.exe' | |
57 | + output_lib = 'node.dll' | |
58 | else: | |
59 | - if is_windows: | |
60 | - output_file += '.dll' | |
61 | - else: | |
62 | - output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix') | |
c2768f1e AM |
63 | + output_bin = 'node' |
64 | + output_lib = 'libnode.' + variables.get('shlib_suffix') | |
c2768f1e AM |
65 | |
66 | - if 'false' == variables.get('node_shared'): | |
67 | - action([output_prefix + output_file], 'bin/' + output_file) | |
68 | - else: | |
69 | - action([output_prefix + output_file], 'lib/' + output_file) | |
70 | + action([output_prefix + output_bin], 'bin/' + output_bin) | |
71 | + if 'true' == variables.get('node_shared'): | |
72 | + action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib) | |
73 | ||
74 | if 'true' == variables.get('node_use_dtrace'): | |
75 | action(['out/Release/node.d'], 'lib/dtrace/node.d') | |
76 | -- | |
77 | 2.23.0 | |
78 |