From: Thomas Weißschuh Date: Sun, 12 Apr 2026 06:04:38 +0000 (+0200) Subject: meson: build test_scols_termreduce X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d75d63b655907c70f98f129aee5c21e8ade9e50;p=thirdparty%2Futil-linux.git meson: build test_scols_termreduce Build the test helper for the libsmartcols tests. The helper expects libsmartcols.h to be in "$builddir/libsmartcols/src", so make sure meson also places it there. Signed-off-by: Thomas Weißschuh --- diff --git a/libsmartcols/meson.build b/libsmartcols/meson.build index a1d2d4829..81cac8aa1 100644 --- a/libsmartcols/meson.build +++ b/libsmartcols/meson.build @@ -3,13 +3,7 @@ dir_libsmartcols = include_directories('.', 'src') defs = configuration_data() defs.set('LIBSMARTCOLS_VERSION', pc_version) -configure_file( - input : 'src/libsmartcols.h.in', - output : 'libsmartcols.h', - configuration : defs, - install : build_libsmartcols, - install_dir : get_option('includedir') / 'libsmartcols', -) +subdir('src') scols_bison = generator( bison, diff --git a/libsmartcols/src/meson.build b/libsmartcols/src/meson.build new file mode 100644 index 000000000..68a501369 --- /dev/null +++ b/libsmartcols/src/meson.build @@ -0,0 +1,7 @@ +configure_file( + input : 'libsmartcols.h.in', + output : 'libsmartcols.h', + configuration : defs, + install : build_libsmartcols, + install_dir : get_option('includedir') / 'libsmartcols', +) diff --git a/meson.build b/meson.build index f5b0ba7c1..034cd1cc4 100644 --- a/meson.build +++ b/meson.build @@ -3991,6 +3991,16 @@ exe = executable( build_by_default: program_tests) exes += exe +exe = executable( + 'test_scols_termreduce', + 'tests/helpers/test_scols_termreduce.c', + include_directories : includes, + link_with : [lib_smartcols], + build_by_default: program_tests) +if not is_disabler(exe) + exes += exe +endif + ############################################################ if conf.get('HAVE_OPENAT').to_string() == '1'