diff options
author | David Robillard <d@drobilla.net> | 2023-09-23 16:21:27 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-09-23 16:21:27 -0400 |
commit | 58993e08dba6fc9d93184df5a79f914d0c9141cd (patch) | |
tree | e4791ca41a4b567b3e1fb46a38e3113df57e5a46 | |
parent | e2e65a8c8b816a066da1f7a4843ca7f504c2b3d9 (diff) | |
download | zix-58993e08dba6fc9d93184df5a79f914d0c9141cd.tar.gz zix-58993e08dba6fc9d93184df5a79f914d0c9141cd.tar.bz2 zix-58993e08dba6fc9d93184df5a79f914d0c9141cd.zip |
Format meson.build files with muon
The less time wasted with manual code formatting, the better.
-rw-r--r-- | doc/html/meson.build | 11 | ||||
-rw-r--r-- | doc/singlehtml/meson.build | 11 | ||||
-rw-r--r-- | meson.build | 88 | ||||
-rw-r--r-- | test/meson.build | 4 |
4 files changed, 70 insertions, 44 deletions
diff --git a/doc/html/meson.build b/doc/html/meson.build index 7403e95..14ded6d 100644 --- a/doc/html/meson.build +++ b/doc/html/meson.build @@ -7,7 +7,10 @@ custom_target( 'html', build_by_default: true, command: [ - sphinx_build, '-M', 'html', '@OUTDIR@' / '..', '@OUTDIR@' / '..', + sphinx_build, + '-M', 'html', + '@OUTDIR@' / '..', + '@OUTDIR@' / '..', '-t', 'html', ] + sphinx_flags, input: [c_rst_files, c_zix_rst, c_index_xml, conf_py], @@ -26,5 +29,9 @@ custom_target( ) if not meson.is_subproject() - summary('Paginated HTML', get_option('prefix') / html_dir, section: 'Directories') + summary( + 'Paginated HTML', + get_option('prefix') / html_dir, + section: 'Directories', + ) endif diff --git a/doc/singlehtml/meson.build b/doc/singlehtml/meson.build index 178e2dd..0fea876 100644 --- a/doc/singlehtml/meson.build +++ b/doc/singlehtml/meson.build @@ -7,7 +7,10 @@ custom_target( 'singlehtml', build_by_default: true, command: [ - sphinx_build, '-M', 'singlehtml', '@OUTDIR@' / '..', '@OUTDIR@' / '..', + sphinx_build, + '-M', 'singlehtml', + '@OUTDIR@' / '..', + '@OUTDIR@' / '..', '-t', 'singlehtml', ] + sphinx_flags, input: [c_rst_files, c_zix_rst, c_index_xml, conf_py], @@ -20,5 +23,9 @@ custom_target( ) if not meson.is_subproject() - summary('Unified HTML', get_option('prefix') / singlehtml_dir, section: 'Directories') + summary( + 'Unified HTML', + get_option('prefix') / singlehtml_dir, + section: 'Directories', + ) endif diff --git a/meson.build b/meson.build index 7a0465a..9d5e440 100644 --- a/meson.build +++ b/meson.build @@ -197,54 +197,64 @@ else template = '#include <@0@>\nint main(void) { @1@ }' mac_checks = { - 'clonefile': - template.format( - 'sys/clonefile.h', - 'return clonefile("/src", "/dst", 0);'), + 'clonefile': template.format( + 'sys/clonefile.h', + 'return clonefile("/src", "/dst", 0);', + ), } posix_checks = { - 'clock_gettime': - template.format( - 'time.h', - 'struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t);'), + 'clock_gettime': template.format( + 'time.h', + 'struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t);', + ), - 'copy_file_range': - template.format( - 'unistd.h', - 'return copy_file_range(0, NULL, 1, NULL, 0U, 0U);'), + 'copy_file_range': template.format( + 'unistd.h', + 'return copy_file_range(0, NULL, 1, NULL, 0U, 0U);', + ), 'fileno': template.format('stdio.h', 'return fileno(stdin);'), 'flock': template.format('sys/file.h', 'return flock(0, 0);'), - 'lstat': - template.format('sys/stat.h', 'struct stat s; return lstat("/", &s);'), + 'lstat': template.format( + 'sys/stat.h', + 'struct stat s; return lstat("/", &s);', + ), 'mlock': template.format('sys/mman.h', 'return mlock(0, 0);'), - 'pathconf': - template.format('unistd.h', 'return pathconf("/", _PC_PATH_MAX) > 0L;'), + 'pathconf': template.format( + 'unistd.h', + 'return pathconf("/", _PC_PATH_MAX) > 0L;', + ), 'posix_fadvise': template.format( 'fcntl.h', - 'posix_fadvise(0, 0, 4096, POSIX_FADV_SEQUENTIAL);'), - - 'posix_memalign': - template.format('stdlib.h', 'void* mem; posix_memalign(&mem, 8, 8);'), - - 'realpath': - template.format('stdlib.h', 'return realpath("/", NULL) != NULL;'), - - 'sysconf': - template.format('unistd.h', 'return sysconf(_SC_PAGE_SIZE) > 0L;'), + 'posix_fadvise(0, 0, 4096, POSIX_FADV_SEQUENTIAL);', + ), + + 'posix_memalign': template.format( + 'stdlib.h', + 'void* mem; posix_memalign(&mem, 8, 8);', + ), + + 'realpath': template.format( + 'stdlib.h', + 'return realpath("/", NULL) != NULL;', + ), + + 'sysconf': template.format( + 'unistd.h', + 'return sysconf(_SC_PAGE_SIZE) > 0L;', + ), } windows_checks = { - 'CreateSymbolicLink': - template.format( - 'windows.h', - 'return CreateSymbolicLink(' + - '"l", "t", SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE);'), + 'CreateSymbolicLink': template.format( + 'windows.h', + 'return CreateSymbolicLink(' + '"l", "t", SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE);', + ), } if host_machine.system() == 'darwin' @@ -255,12 +265,14 @@ else checks = posix_checks if thread_dep.found() - if cc.links('''#include <semaphore.h> + if cc.links( + '''#include <semaphore.h> #include <time.h> int main(void) { sem_t s; struct timespec t; return sem_timedwait(&s, &t); }''', - args: system_c_args, - dependencies: thread_dep, - name: 'sem_timedwait') + args: system_c_args, + dependencies: thread_dep, + name: 'sem_timedwait', + ) platform_c_args += ['-DHAVE_SEM_TIMEDWAIT'] endif endif @@ -455,9 +467,9 @@ if not meson.is_subproject() summary( { - 'Install prefix': get_option('prefix'), - 'Headers': get_option('prefix') / get_option('includedir'), - 'Libraries': get_option('prefix') / get_option('libdir'), + 'Install prefix': get_option('prefix'), + 'Headers': get_option('prefix') / get_option('includedir'), + 'Libraries': get_option('prefix') / get_option('libdir'), }, section: 'Directories', ) diff --git a/test/meson.build b/test/meson.build index bd752a3..193d898 100644 --- a/test/meson.build +++ b/test/meson.build @@ -95,7 +95,7 @@ foreach test, cases : sequential_tests link_args: program_link_args, ) - test_executables += { test: exe } + test_executables += {test: exe} foreach suffix, args : cases test(test + suffix, exe, args: args, suite: 'unit', timeout: 120) endforeach @@ -114,7 +114,7 @@ if thread_dep.found() link_args: program_link_args, ) - test_executables += { test: exe } + test_executables += {test: exe} foreach suffix, args : cases test(test + suffix, exe, args: args, suite: 'unit', timeout: 120) endforeach |