diff options
-rw-r--r-- | include/meson.build | 10 | ||||
-rw-r--r-- | man/meson.build | 7 | ||||
-rw-r--r-- | meson.build | 15 | ||||
-rw-r--r-- | meson.format | 5 | ||||
-rw-r--r-- | src/dnsstub/meson.build | 15 | ||||
-rw-r--r-- | src/meson.build | 62 |
6 files changed, 64 insertions, 50 deletions
diff --git a/include/meson.build b/include/meson.build index 42439fd..7e4cbd0 100644 --- a/include/meson.build +++ b/include/meson.build @@ -1,6 +1,6 @@ qlibs_inc = include_directories('.') -qlibs_hdrs = [ +qlibs_hdrs = files( 'alloc.h', 'base64.h', 'buffer.h', @@ -37,15 +37,15 @@ qlibs_hdrs = [ 'select.h', 'sig.h', 'socket_if.h', - 'stralloc.h', 'str.h', - 'taia.h', + 'stralloc.h', 'tai.h', - 'timeoutconn.h', + 'taia.h', 'timeout.h', + 'timeoutconn.h', 'uint_t.h', 'wait.h', -] +) qlibs_hdr_subdir = 'fehqlibs' diff --git a/man/meson.build b/man/meson.build index 53c6a41..de271aa 100644 --- a/man/meson.build +++ b/man/meson.build @@ -47,7 +47,8 @@ foreach m : qlibs_mans endforeach install_data( - sources : qlibs_mans, - rename : renamed, + sources : qlibs_mans, + rename : renamed, install_tag : 'man', - install_dir : get_option('mandir') / ('man' + man_section)) + install_dir : get_option('mandir') / ('man' + man_section), +) diff --git a/meson.build b/meson.build index 0fef8bb..7327000 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,12 @@ -project('fehqlibs', 'c', - meson_version : '>=1.1.0', - version : run_command('cut', '-f2', '-d-', 'VERSION', check : true).stdout().strip(), - license : 'CUSTOM', - license_files : 'LICENSE', - default_options : ['c_std=gnu99']) +project( + 'fehqlibs', + 'c', + meson_version : '>=1.1.0', + version : run_command('cut', '-f2', '-d-', 'VERSION', check : true).stdout().strip(), + license : 'CUSTOM', + license_files : 'LICENSE', + default_options : ['c_std=gnu99'], +) subdir('include') subdir('src') diff --git a/meson.format b/meson.format new file mode 100644 index 0000000..fe8362b --- /dev/null +++ b/meson.format @@ -0,0 +1,5 @@ +max_line_length = 100 +indent_by = ' ' +wide_colon = true +end_of_line = lf +sort_files = true diff --git a/src/dnsstub/meson.build b/src/dnsstub/meson.build index e1a6cf0..b421ac9 100644 --- a/src/dnsstub/meson.build +++ b/src/dnsstub/meson.build @@ -1,4 +1,4 @@ -dnsresolv_srcs = [ +dnsresolv_srcs = files( 'dns_cname.c', 'dns_dfd.c', 'dns_domain.c', @@ -16,9 +16,12 @@ dnsresolv_srcs = [ 'dns_sortip.c', 'dns_transmit.c', 'dns_txt.c', -] +) -dnsresolv_lib = library('dnsresolv', dnsresolv_srcs, - install : true, - link_with : qlibs_lib, - include_directories : qlibs_inc) +dnsresolv_lib = library( + 'dnsresolv', + sources : dnsresolv_srcs, + install : true, + link_with : qlibs_lib, + include_directories : qlibs_inc, +) diff --git a/src/meson.build b/src/meson.build index 03e3c01..c3593f4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,40 +1,36 @@ -cdb_srcs = [ - 'buffer.c', - 'cdbmake.c', - 'cdbread.c', - 'uint32p.c', - 'seek.c', -] -cmap_srcs = ['alloc.c', 'buffer.c', 'constmap.c', 'scan.c'] -fs_srcs = ['fmt.c', 'scan.c'] -ip_srcs = ['ip4.c', 'ip6.c', 'socket_if.c'] -str_srcs = ['alloc.c', 'byte.c', 'str.c', 'stralloc.c'] -logmsg_srcs = ['errstr.c', 'logmsg.c'] -time_srcs = ['iopause.c', 'tai.c', 'taia.c', 'timeout.c', 'timeoutconn.c'] -pack_srcs = ['uint8p.c', 'uint16p.c', 'uint32p.c', 'uint64p.c', 'uint128p.c'] +cdb_srcs = files('buffer.c', 'cdbmake.c', 'cdbread.c', 'seek.c', 'uint32p.c') +cmap_srcs = files('alloc.c', 'buffer.c', 'constmap.c', 'scan.c') +fs_srcs = files('fmt.c', 'scan.c') +ip_srcs = files('ip4.c', 'ip6.c', 'socket_if.c') +str_srcs = files('alloc.c', 'byte.c', 'str.c', 'stralloc.c') +logmsg_srcs = files('errstr.c', 'logmsg.c') +time_srcs = files('iopause.c', 'tai.c', 'taia.c', 'timeout.c', 'timeoutconn.c') +pack_srcs = files('uint128p.c', 'uint16p.c', 'uint32p.c', 'uint64p.c', 'uint8p.c') -socket_srcs = [ +socket_srcs = files( 'socket_bind.c', 'socket_connect.c', 'socket_if.c', 'socket_info.c', + 'socket_recv.c', + 'socket_send.c', 'socket_setup.c', 'socket_tcp.c', 'socket_udp.c', - - 'socket_recv.c', - 'socket_send.c', -] -socket_srcs += ['ndelay.c', 'uint16p.c'] +) +socket_srcs += files('ndelay.c', 'uint16p.c') socket_srcs += ip_srcs socket_srcs += str_srcs socket_srcs += fs_srcs -socket_lib = library('socket', socket_srcs, - include_directories : qlibs_inc, - build_by_default : false) +socket_lib = library( + 'socket', + sources : socket_srcs, + include_directories : qlibs_inc, + build_by_default : false, +) -other_srcs = [ +other_srcs = files( 'base64.c', 'case.c', 'env.c', @@ -49,7 +45,7 @@ other_srcs = [ 'readclose.c', 'sig.c', 'wait.c', -] +) core_srcs = other_srcs core_srcs += cdb_srcs @@ -64,11 +60,17 @@ core_srcs += pack_srcs cc = meson.get_compiler('c') -qlibs_c_args = cc.has_header_symbol('sys/file.h', 'flock') ? '-DHASFLOCK' : '' +qlibs_c_args = [] +if cc.has_header_symbol('sys/file.h', 'flock') + qlibs_c_args += '-DHASFLOCK' +endif -qlibs_lib = library('qlibs', core_srcs, - install : true, - c_args : qlibs_c_args, - include_directories : qlibs_inc) +qlibs_lib = library( + 'qlibs', + sources : core_srcs, + install : true, + c_args : qlibs_c_args, + include_directories : qlibs_inc, +) subdir('dnsstub') |