]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - meson.build
Wall: Fix terminal flag usage
[thirdparty/util-linux.git] / meson.build
index 119b35562f85669fb12fbc5e283bb59dd3e1b227..883e79ad607c389e88c5467e36ac5d188174cab5 100644 (file)
@@ -10,7 +10,7 @@ project('util-linux', 'c',
 fs = import('fs')
 pkgconfig = import('pkgconfig')
 
-# soname versions; This never change because we use symbols versioing. There is also
+# soname versions; This never change because we use symbol versioning. There is also
 # API version (LIB*_VERSION macros) and it follow package version.
 libblkid_version = '1.1.0'
 libblkid_date = '01-Jun-2021'
@@ -189,8 +189,6 @@ headers = '''
         unistd.h
         utmp.h
         utmpx.h
-        asm-generic/fcntl.h
-        asm/fcntl.h
         asm/io.h
         linux/blkzoned.h
         linux/capability.h
@@ -915,11 +913,7 @@ bison_gen = generator(
   output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
   arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'])
 
-python_module = import('python')
-python = python_module.find_installation(
-    get_option('python'),
-    required : true,
-    disabler : true)
+python_program = find_program('python3', 'python', native : true)
 
 meson_make_symlink = meson.current_source_dir() + '/tools/meson-make-symlink.sh'
 meson_make_manpage_stub = meson.current_source_dir() + '/tools/meson-make-manpage-stub.sh'
@@ -1654,7 +1648,9 @@ if opt and not is_disabler(exe)
   bashcompletions += ['ldattach']
 endif
 
-opt = get_option('build-rtcwake').require(cc.has_header('linux/rtc.h')).allowed()
+have_linux_rtc_h = cc.has_header('linux/rtc.h')
+
+opt = get_option('build-rtcwake').require(have_linux_rtc_h).allowed()
 exe = executable(
   'rtcwake',
   rtcwake_sources,
@@ -3185,14 +3181,16 @@ if opt and not is_disabler(exe)
   bashcompletions += ['enosys']
 endif
 
+opt = get_option('build-lsclocks').require(have_linux_rtc_h).allowed()
 exe = executable(
   'lsclocks',
   lsclocks_sources,
   include_directories : includes,
   link_with : [lib_common, lib_smartcols],
   install_dir : usrbin_exec_dir,
-  install : true)
-if not is_disabler(exe)
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
   exes += exe
   manadocs += ['misc-utils/lsclocks.1.adoc']
   bashcompletions += ['lsclocks']
@@ -3252,13 +3250,23 @@ exe4 = executable(
   install : opt,
   build_by_default : opt)
 
+exe5 = executable(
+  'coresched',
+  'schedutils/coresched.c',
+  include_directories : includes,
+  link_with : lib_common,
+  install_dir : usrbin_exec_dir,
+  install : opt,
+  build_by_default : opt)
+
 if opt and not is_disabler(exe)
-  exes += [exe, exe2, exe3, exe4]
+  exes += [exe, exe2, exe3, exe4, exe5]
   manadocs += ['schedutils/chrt.1.adoc',
                'schedutils/ionice.1.adoc',
                'schedutils/taskset.1.adoc',
-              'schedutils/uclampset.1.adoc']
-  bashcompletions += ['chrt', 'ionice', 'taskset', 'uclampset']
+               'schedutils/uclampset.1.adoc',
+               'schedutils/coresched.1.adoc']
+  bashcompletions += ['chrt', 'ionice', 'taskset', 'uclampset', 'coresched']
 endif
 
 ############################################################
@@ -3460,6 +3468,17 @@ if not is_disabler(exe)
   exes += exe
 endif
 
+exe = executable(
+  'test_uuid_time',
+  test_uuid_time_sources,
+  include_directories : [dir_include],
+  link_with : lib_uuid,
+  c_args : '-DTEST_PROGRAM',
+  build_by_default : program_tests)
+if not is_disabler(exe)
+  exes += exe
+endif
+
 ############################################################
 
 libfdisk_tests_cflags = ['-DTEST_PROGRAM']
@@ -3772,7 +3791,7 @@ configure_file(output : 'meson.conf',
                           '''asan=@0@
 PYTHON=@1@
 '''.format(get_option('b_sanitize')=='address' ? 'yes' : '',
-           python.full_path())])
+           python_program.full_path())])
 
 run_sh = find_program('tests/run.sh')
 run_target(