Skip to content

Commit

Permalink
build: make gyp user defined variables lowercase
Browse files Browse the repository at this point in the history
I mistakenly introduced user defined variables using uppercase
characters, reading the gyp documentation they state:
"Predefined variables. By convention, these are named with
CAPITAL_LETTERS. Predefined variables are set automatically by GYP"
and also "By convention, user-defined variables are named with
lowercase_letters."

This commit renames the user defined variables to lowercase to follow
the above mentioned convention.

Backport-PR-URL: #20797
PR-URL: #16238
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev authored and MylesBorins committed Jun 14, 2018
1 parent fafcaa1 commit 8c3be5c
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 104 deletions.
20 changes: 10 additions & 10 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@

'conditions': [
['GENERATOR=="ninja"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
}, {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
'v8_postmortem_support%': 'false',
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
}, {
'os_posix': 1,
'v8_postmortem_support%': 'true',
}],
['OS== "mac"', {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
}],
['openssl_fips != ""', {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
}, {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
}],
['OS=="mac"', {
'clang%': 1,
Expand Down
151 changes: 64 additions & 87 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
'conditions': [
['OS in "linux freebsd openbsd solaris android"', {
'ldflags': [
'-Wl,--whole-archive,<(OBJ_DIR)/<(STATIC_LIB_PREFIX)'
'-Wl,--whole-archive,<(obj_dir)/<(STATIC_LIB_PREFIX)'
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
'-Wl,--no-whole-archive',
],
Expand Down Expand Up @@ -750,10 +750,10 @@
{
'action_name': 'node_dtrace_provider_o',
'inputs': [
'<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace.o',
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace.o',
],
'outputs': [
'<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_provider.o'
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_provider.o'
],
'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
'<@(_inputs)', '-o', '<@(_outputs)' ]
Expand Down Expand Up @@ -785,7 +785,7 @@
{
'action_name': 'node_dtrace_ustack_constants',
'inputs': [
'<(V8_BASE)'
'<(v8_base)'
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
Expand All @@ -803,7 +803,7 @@
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
],
'outputs': [
'<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_ustack.o'
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_ustack.o'
],
'conditions': [
[ 'target_arch=="ia32" or target_arch=="arm"', {
Expand Down Expand Up @@ -893,32 +893,32 @@
],

'variables': {
'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/src',
'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/gen',
'OBJ_TRACING_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/src/tracing',
'OBJ_SUFFIX': 'o',
'OBJ_SEPARATOR': '/',
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)/src/tracing',
'obj_suffix': 'o',
'obj_separator': '/',
'conditions': [
['OS=="win"', {
'OBJ_SUFFIX': 'obj',
'obj_suffix': 'obj',
}],
['GENERATOR=="ninja"', {
'OBJ_PATH': '<(OBJ_DIR)/src',
'OBJ_GEN_PATH': '<(OBJ_DIR)/gen',
'OBJ_TRACING_PATH': '<(OBJ_DIR)/src/tracing',
'OBJ_SEPARATOR': '/<(node_lib_target_name).',
'obj_path': '<(obj_dir)/src',
'obj_gen_path': '<(obj_dir)/gen',
'obj_tracing_path': '<(obj_dir)/src/tracing',
'obj_separator': '/<(node_lib_target_name).',
}, {
'conditions': [
['OS=="win"', {
'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)',
'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)',
'OBJ_TRACING_PATH': '<(OBJ_DIR)/<(node_lib_target_name)',
'obj_path': '<(obj_dir)/<(node_lib_target_name)',
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)',
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)',
}],
['OS=="aix"', {
'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/src',
'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/gen',
'OBJ_TRACING_PATH':
'<(OBJ_DIR)/<(node_lib_target_name)/src/tracing',
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
'obj_tracing_path':
'<(obj_dir)/<(node_lib_target_name)/src/tracing',
}],
]}
]
Expand Down Expand Up @@ -952,60 +952,37 @@
],

'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)async_wrap.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)env.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_buffer.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_i18n.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_perf.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_platform.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_url.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)util.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)string_bytes.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)string_search.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)stream_base.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_constants.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)agent.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_buffer.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_writer.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)trace_event.<(OBJ_SUFFIX)',
'<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)async_wrap.<(obj_suffix)',
'<(obj_path)<(obj_separator)handle_wrap.<(obj_suffix)',
'<(obj_path)<(obj_separator)env.<(obj_suffix)',
'<(obj_path)<(obj_separator)node.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_buffer.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_debug_options.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_i18n.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_perf.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_platform.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_url.<(obj_suffix)',
'<(obj_path)<(obj_separator)util.<(obj_suffix)',
'<(obj_path)<(obj_separator)string_bytes.<(obj_suffix)',
'<(obj_path)<(obj_separator)string_search.<(obj_suffix)',
'<(obj_path)<(obj_separator)stream_base.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_constants.<(obj_suffix)',
'<(obj_tracing_path)<(obj_separator)agent.<(obj_suffix)',
'<(obj_tracing_path)<(obj_separator)node_trace_buffer.<(obj_suffix)',
'<(obj_tracing_path)<(obj_separator)node_trace_writer.<(obj_suffix)',
'<(obj_tracing_path)<(obj_separator)trace_event.<(obj_suffix)',
'<(obj_gen_path)<(obj_separator)node_javascript.<(obj_suffix)',
],

'conditions': [
['node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)async_wrap.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)handle_wrap.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)env.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_buffer.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_i18n.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_perf.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_platform.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_url.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)util.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)string_bytes.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)string_search.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)stream_base.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_constants.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)agent.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_buffer.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_writer.<(OBJ_SUFFIX)',
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)trace_event.<(OBJ_SUFFIX)',
'<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)',
],
}],
[ 'node_use_openssl=="true"', {
'conditions': [
['node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto_bio.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto_clienthello.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)tls_wrap.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)node_crypto.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_crypto_bio.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_crypto_clienthello.<(obj_suffix)',
'<(obj_path)<(obj_separator)tls_wrap.<(obj_suffix)',
],
}],
],
Expand All @@ -1016,9 +993,9 @@
[ 'node_use_perfctr=="true"', {
'defines': [ 'HAVE_PERFCTR=1' ],
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_counters.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)'
'node_win32_perfctr_provider.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)node_counters.<(obj_suffix)',
'<(obj_path)<(obj_separator)'
'node_win32_perfctr_provider.<(obj_suffix)',
],
}],
['v8_enable_inspector==1', {
Expand All @@ -1029,11 +1006,11 @@
'conditions': [
['node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_agent.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_io.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_js_api.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_socket.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_socket_server.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)inspector_agent.<(obj_suffix)',
'<(obj_path)<(obj_separator)inspector_io.<(obj_suffix)',
'<(obj_path)<(obj_separator)inspector_js_api.<(obj_suffix)',
'<(obj_path)<(obj_separator)inspector_socket.<(obj_suffix)',
'<(obj_path)<(obj_separator)inspector_socket_server.<(obj_suffix)',
],
}],
],
Expand All @@ -1043,42 +1020,42 @@
}],
[ 'node_use_dtrace=="true" and node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
],
'conditions': [
['OS!="mac" and OS!="linux"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_provider.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_ustack.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)node_dtrace_provider.<(obj_suffix)',
'<(obj_path)<(obj_separator)node_dtrace_ustack.<(obj_suffix)',
]
}],
['OS=="linux"', {
'libraries': [
'<(SHARED_INTERMEDIATE_DIR)<(OBJ_SEPARATOR)'
'node_dtrace_provider.<(OBJ_SUFFIX)',
'<(SHARED_INTERMEDIATE_DIR)<(obj_separator)'
'node_dtrace_provider.<(obj_suffix)',
]
}],
],
}, {
'conditions': [
[ 'node_use_etw=="true" and OS=="win"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)',
'<(OBJ_PATH)<(OBJ_SEPARATOR)'
'node_win32_etw_provider.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
'<(obj_path)<(obj_separator)'
'node_win32_etw_provider.<(obj_suffix)',
],
}]
]
}],
[ 'OS=="win" and node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)backtrace_win32.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)backtrace_win32.<(obj_suffix)',
],
}, {
'conditions': [
['node_target_type!="static_library"', {
'libraries': [
'<(OBJ_PATH)<(OBJ_SEPARATOR)backtrace_posix.<(OBJ_SUFFIX)',
'<(obj_path)<(obj_separator)backtrace_posix.<(obj_suffix)',
],
}],
],
Expand Down
14 changes: 7 additions & 7 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
[ 'force_load=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'-Wl,-force_load,<(V8_BASE)',
'-Wl,-force_load,<(v8_base)',
],
},
}],
Expand Down Expand Up @@ -154,7 +154,7 @@
{
'action_name': 'expfile',
'inputs': [
'<(OBJ_DIR)'
'<(obj_dir)'
],
'outputs': [
'<(PRODUCT_DIR)/node.exp'
Expand Down Expand Up @@ -186,13 +186,13 @@
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"'
' and coverage=="false" and force_load=="true"', {
'ldflags': [ '-Wl,-z,noexecstack',
'-Wl,--whole-archive <(V8_BASE)',
'-Wl,--whole-archive <(v8_base)',
'-Wl,--no-whole-archive' ]
}],
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"'
' and coverage=="true" and force_load=="true"', {
'ldflags': [ '-Wl,-z,noexecstack',
'-Wl,--whole-archive <(V8_BASE)',
'-Wl,--whole-archive <(v8_base)',
'-Wl,--no-whole-archive',
'--coverage',
'-g',
Expand Down Expand Up @@ -237,15 +237,15 @@
[ 'force_load=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [
'-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
'-Wl,-force_load,<(PRODUCT_DIR)/<(openssl_product)',
],
},
'conditions': [
['OS in "linux freebsd" and node_shared=="false"', {
'ldflags': [
'-Wl,--whole-archive,'
'<(OBJ_DIR)/deps/openssl/'
'<(OPENSSL_PRODUCT)',
'<(obj_dir)/deps/openssl/'
'<(openssl_product)',
'-Wl,--no-whole-archive',
],
}],
Expand Down

0 comments on commit 8c3be5c

Please sign in to comment.