Skip to content

Commit

Permalink
gyp: put filenames in variables
Browse files Browse the repository at this point in the history
PR-URL: #46965
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
zcbenz authored and targos committed Mar 18, 2023
1 parent aa6e9c8 commit 0d575fe
Show file tree
Hide file tree
Showing 13 changed files with 688 additions and 606 deletions.
3 changes: 2 additions & 1 deletion deps/ada/ada.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
'variables': {
'v8_enable_i18n_support%': 1,
'ada_sources': [ 'ada.cpp' ],
},
'targets': [
{
Expand All @@ -10,7 +11,7 @@
'direct_dependent_settings': {
'include_dirs': ['.'],
},
'sources': ['ada.cpp'],
'sources': [ '<@(ada_sources)' ],
'conditions': [
['v8_enable_i18n_support==0', {
'defines': ['ADA_HAS_ICU=0'],
Expand Down
15 changes: 9 additions & 6 deletions deps/base64/base64.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
'variables': {
'arm_fpu%': '',
'target_arch%': '',
'base64_sources_common': [
'base64/include/libbase64.h',
'base64/lib/arch/generic/codec.c',
'base64/lib/tables/tables.c',
'base64/lib/codec_choose.c',
'base64/lib/codecs.h',
'base64/lib/lib.c',
],
},
'targets': [
{
Expand All @@ -14,12 +22,7 @@
},
'defines': [ 'BASE64_STATIC_DEFINE' ],
'sources': [
'base64/include/libbase64.h',
'base64/lib/arch/generic/codec.c',
'base64/lib/tables/tables.c',
'base64/lib/codec_choose.c',
'base64/lib/codecs.h',
'base64/lib/lib.c',
'<@(base64_sources_common)',
],

'conditions': [
Expand Down
73 changes: 39 additions & 34 deletions deps/brotli/brotli.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
{
'variables': {
'brotli_sources': [
# Common
'c/common/constants.c',
'c/common/context.c',
'c/common/dictionary.c',
'c/common/platform.c',
'c/common/transform.c',

# Decoder
'c/dec/bit_reader.c',
'c/dec/decode.c',
'c/dec/huffman.c',
'c/dec/state.c',

# Encoder
'c/enc/backward_references.c',
'c/enc/backward_references_hq.c',
'c/enc/bit_cost.c',
'c/enc/block_splitter.c',
'c/enc/brotli_bit_stream.c',
'c/enc/cluster.c',
'c/enc/command.c',
'c/enc/compress_fragment.c',
'c/enc/compress_fragment_two_pass.c',
'c/enc/dictionary_hash.c',
'c/enc/encode.c',
'c/enc/encoder_dict.c',
'c/enc/entropy_encode.c',
'c/enc/fast_log.c',
'c/enc/histogram.c',
'c/enc/literal_cost.c',
'c/enc/memory.c',
'c/enc/metablock.c',
'c/enc/static_dict.c',
'c/enc/utf8_util.c',
]
},
'targets': [
{
'target_name': 'brotli',
Expand Down Expand Up @@ -28,40 +66,7 @@
'-lm',
],
'sources': [
# Common
'c/common/constants.c',
'c/common/context.c',
'c/common/dictionary.c',
'c/common/platform.c',
'c/common/transform.c',

# Decoder
'c/dec/bit_reader.c',
'c/dec/decode.c',
'c/dec/huffman.c',
'c/dec/state.c',

# Encoder
'c/enc/backward_references.c',
'c/enc/backward_references_hq.c',
'c/enc/bit_cost.c',
'c/enc/block_splitter.c',
'c/enc/brotli_bit_stream.c',
'c/enc/cluster.c',
'c/enc/command.c',
'c/enc/compress_fragment.c',
'c/enc/compress_fragment_two_pass.c',
'c/enc/dictionary_hash.c',
'c/enc/encode.c',
'c/enc/encoder_dict.c',
'c/enc/entropy_encode.c',
'c/enc/fast_log.c',
'c/enc/histogram.c',
'c/enc/literal_cost.c',
'c/enc/memory.c',
'c/enc/metablock.c',
'c/enc/static_dict.c',
'c/enc/utf8_util.c'
'<@(brotli_sources)',
]
}
]
Expand Down
175 changes: 92 additions & 83 deletions deps/cares/cares.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,94 @@
{
'variables': {
'cares_sources_common': [
'include/ares.h',
'include/ares_dns.h',
'include/ares_nameser.h',
'include/ares_rules.h',
'include/ares_version.h',
'src/lib/ares__addrinfo2hostent.c',
'src/lib/ares__addrinfo_localhost.c',
'src/lib/ares_android.c',
'src/lib/ares_cancel.c',
'src/lib/ares__close_sockets.c',
'src/lib/ares_create_query.c',
'src/lib/ares_data.c',
'src/lib/ares_data.h',
'src/lib/ares_destroy.c',
'src/lib/ares_expand_name.c',
'src/lib/ares_expand_string.c',
'src/lib/ares_fds.c',
'src/lib/ares_free_hostent.c',
'src/lib/ares_free_string.c',
'src/lib/ares_freeaddrinfo.c',
'src/lib/ares_getenv.h',
'src/lib/ares_getaddrinfo.c',
'src/lib/ares_gethostbyaddr.c',
'src/lib/ares_gethostbyname.c',
'src/lib/ares__get_hostent.c',
'src/lib/ares_getnameinfo.c',
'src/lib/ares_getsock.c',
'src/lib/ares_init.c',
'src/lib/ares_ipv6.h',
'src/lib/ares_library_init.c',
'src/lib/ares_library_init.h',
'src/lib/ares_llist.c',
'src/lib/ares_llist.h',
'src/lib/ares_mkquery.c',
'src/lib/ares_nowarn.c',
'src/lib/ares_nowarn.h',
'src/lib/ares_options.c',
'src/lib/ares__parse_into_addrinfo.c',
'src/lib/ares_parse_aaaa_reply.c',
'src/lib/ares_parse_a_reply.c',
'src/lib/ares_parse_caa_reply.c',
'src/lib/ares_parse_mx_reply.c',
'src/lib/ares_parse_naptr_reply.c',
'src/lib/ares_parse_ns_reply.c',
'src/lib/ares_parse_ptr_reply.c',
'src/lib/ares_parse_soa_reply.c',
'src/lib/ares_parse_srv_reply.c',
'src/lib/ares_parse_txt_reply.c',
'src/lib/ares_parse_uri_reply.c',
'src/lib/ares_platform.h',
'src/lib/ares_private.h',
'src/lib/ares_process.c',
'src/lib/ares_query.c',
'src/lib/ares__read_line.c',
'src/lib/ares__readaddrinfo.c',
'src/lib/ares_search.c',
'src/lib/ares_send.c',
'src/lib/ares_setup.h',
'src/lib/ares__sortaddrinfo.c',
'src/lib/ares_strcasecmp.c',
'src/lib/ares_strcasecmp.h',
'src/lib/ares_strdup.c',
'src/lib/ares_strdup.h',
'src/lib/ares_strerror.c',
'src/lib/ares_strsplit.c',
'src/lib/ares_timeout.c',
'src/lib/ares__timeval.c',
'src/lib/ares_version.c',
'src/lib/ares_writev.c',
'src/lib/ares_writev.h',
'src/lib/bitncmp.c',
'src/lib/bitncmp.h',
'src/lib/inet_net_pton.c',
'src/lib/inet_ntop.c',
'src/lib/ares_inet_net_pton.h',
'src/lib/setup_once.h',
'src/tools/ares_getopt.c',
'src/tools/ares_getopt.h',
],
'cares_sources_win': [
'src/lib/config-win32.h',
'src/lib/windows_port.c',
'src/lib/ares_getenv.c',
'src/lib/ares_iphlpapi.h',
'src/lib/ares_platform.c',
],
},

'target_defaults': {
'conditions': [
['OS!="win"', {
Expand Down Expand Up @@ -35,84 +125,7 @@
'include_dirs': [ 'include' ]
},
'sources': [
'include/ares.h',
'include/ares_dns.h',
'include/ares_nameser.h',
'include/ares_rules.h',
'include/ares_version.h',
'src/lib/ares__addrinfo2hostent.c',
'src/lib/ares__addrinfo_localhost.c',
'src/lib/ares_android.c',
'src/lib/ares_cancel.c',
'src/lib/ares__close_sockets.c',
'src/lib/ares_create_query.c',
'src/lib/ares_data.c',
'src/lib/ares_data.h',
'src/lib/ares_destroy.c',
'src/lib/ares_expand_name.c',
'src/lib/ares_expand_string.c',
'src/lib/ares_fds.c',
'src/lib/ares_free_hostent.c',
'src/lib/ares_free_string.c',
'src/lib/ares_freeaddrinfo.c',
'src/lib/ares_getenv.h',
'src/lib/ares_getaddrinfo.c',
'src/lib/ares_gethostbyaddr.c',
'src/lib/ares_gethostbyname.c',
'src/lib/ares__get_hostent.c',
'src/lib/ares_getnameinfo.c',
'src/lib/ares_getsock.c',
'src/lib/ares_init.c',
'src/lib/ares_ipv6.h',
'src/lib/ares_library_init.c',
'src/lib/ares_library_init.h',
'src/lib/ares_llist.c',
'src/lib/ares_llist.h',
'src/lib/ares_mkquery.c',
'src/lib/ares_nowarn.c',
'src/lib/ares_nowarn.h',
'src/lib/ares_options.c',
'src/lib/ares__parse_into_addrinfo.c',
'src/lib/ares_parse_aaaa_reply.c',
'src/lib/ares_parse_a_reply.c',
'src/lib/ares_parse_caa_reply.c',
'src/lib/ares_parse_mx_reply.c',
'src/lib/ares_parse_naptr_reply.c',
'src/lib/ares_parse_ns_reply.c',
'src/lib/ares_parse_ptr_reply.c',
'src/lib/ares_parse_soa_reply.c',
'src/lib/ares_parse_srv_reply.c',
'src/lib/ares_parse_txt_reply.c',
'src/lib/ares_parse_uri_reply.c',
'src/lib/ares_platform.h',
'src/lib/ares_private.h',
'src/lib/ares_process.c',
'src/lib/ares_query.c',
'src/lib/ares__read_line.c',
'src/lib/ares__readaddrinfo.c',
'src/lib/ares_search.c',
'src/lib/ares_send.c',
'src/lib/ares_setup.h',
'src/lib/ares__sortaddrinfo.c',
'src/lib/ares_strcasecmp.c',
'src/lib/ares_strcasecmp.h',
'src/lib/ares_strdup.c',
'src/lib/ares_strdup.h',
'src/lib/ares_strerror.c',
'src/lib/ares_strsplit.c',
'src/lib/ares_timeout.c',
'src/lib/ares__timeval.c',
'src/lib/ares_version.c',
'src/lib/ares_writev.c',
'src/lib/ares_writev.h',
'src/lib/bitncmp.c',
'src/lib/bitncmp.h',
'src/lib/inet_net_pton.c',
'src/lib/inet_ntop.c',
'src/lib/ares_inet_net_pton.h',
'src/lib/setup_once.h',
'src/tools/ares_getopt.c',
'src/tools/ares_getopt.h',
'<@(cares_sources_common)',
],
'conditions': [
[ 'library=="static_library"', {
Expand All @@ -127,11 +140,7 @@
],
'include_dirs': [ 'config/win32' ],
'sources': [
'src/lib/config-win32.h',
'src/lib/windows_port.c',
'src/lib/ares_getenv.c',
'src/lib/ares_iphlpapi.h',
'src/lib/ares_platform.c'
'<@(cares_sources_win)',
],
'libraries': [
'-lws2_32.lib',
Expand Down
Loading

0 comments on commit 0d575fe

Please sign in to comment.