]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: update for libsmartcols filter
authorKarel Zak <kzak@redhat.com>
Wed, 4 Oct 2023 16:42:44 +0000 (18:42 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 20 Nov 2023 21:25:46 +0000 (22:25 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/meson.build
meson.build
misc-utils/meson.build

index 122b1e8a851bc9bc9362510192b8756dda04e728..567e58aa753ae7dd59f5097c7c801569f73d2a5e 100644 (file)
@@ -11,6 +11,18 @@ configure_file(
   install_dir : join_paths(get_option('includedir'), 'libsmartcols'),
 )
 
+scols_bison = generator(
+  bison,
+  output : ['@BASENAME@.c'],
+  arguments : ['@INPUT@', '--output=@OUTPUT@'])
+scols_parser_c = scols_bison.process('src/filter-parser.y')
+
+scols_flex = generator(
+  flex,
+  output : ['@BASENAME@.c'],
+  arguments : ['--outfile=@OUTPUT@', '@INPUT@'])
+scols_scanner_c = scols_flex.process('src/filter-scanner.l')
+
 lib_smartcols_sources = '''
   src/smartcolsP.h
   src/iter.c
@@ -26,7 +38,12 @@ lib_smartcols_sources = '''
   src/grouping.c
   src/walk.c
   src/init.c
-'''.split()
+  src/filter.c
+  src/filter-param.c
+  src/filter-expr.c
+'''.split() \
+  + scols_parser_c + scols_scanner_c
+
 
 libsmartcols_sym = 'src/libsmartcols.sym'
 libsmartcols_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsmartcols_sym)
index 80320d323d7e9f9e0144d21f6e228db8396a9f21..93433dc164a1ec4a218afe4f284e26753539cae6 100644 (file)
@@ -838,15 +838,15 @@ conf.set('ONLY_LISTED_SHELLS', have ? 1 : false)
 have = get_option('use-tty-group')
 conf.set('USE_TTY_GROUP', have ? 1 : false)
 
+bison = find_program('bison')
+flex = find_program('flex')
+
 build_hwclock = not get_option('build-hwclock').disabled()
-bison = find_program('bison', required: build_hwclock)
 bison_gen = generator(
   bison,
   output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
   arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'])
 
-
-
 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'
 
index a7cc4e4f3f04d51604514d1c03d5475cf1e3ed70..ee1957890f1c38fd0a73791c50ef2353a7b4d48a 100644 (file)
@@ -42,10 +42,6 @@ lsblk_sources = files(
 lsfd_sources = files (
   'lsfd.c',
   'lsfd.h',
-  'lsfd-filter.h',
-  'lsfd-filter.c',
-  'lsfd-counter.h',
-  'lsfd-counter.c',
   'lsfd-decode-file-flags.c',
   'lsfd-file.c',
   'lsfd-cdev.c',