Skip to content

Commit

Permalink
Compile spotlight sources with flex and bison
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsga committed Mar 12, 2024
1 parent 95de96d commit e12ea0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions etc/spotlight/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
srp_sources = ['sparql_map.c', 'sparql_parser.c', 'spotlight_rawquery_lexer.c']
lgen = generator(flex,
output : '@[email protected]',
arguments : ['-o', '@OUTPUT@', '@INPUT@'])

lfile = lgen.process('spotlight_rawquery_lexer.l')

ygen = generator(bison,
output : '@[email protected]',
arguments : ['-d', '-o', '@OUTPUT@', '@INPUT@'])

yfile = ygen.process('sparql_parser.y')

srp_sources = ['sparql_map.c', yfile, lfile]

executable(
'srp',
Expand All @@ -15,11 +27,7 @@ executable(
install: false,
)

spotlight_sources = [
'sparql_map.c',
'sparql_parser.c',
'spotlight_rawquery_lexer.c',
]
spotlight_sources = ['sparql_map.c', lfile, yfile]

libspotlight = static_library(
'libspotlight',
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ add_global_link_arguments(netatalk_common_link_args, language: 'c')
# Programs #
############

bison = find_program('bison', required: true)
bison = find_program(prefix / 'opt/bison/bin/bison', 'bison', required: true)
flex = find_program('flex', required: true)
grep = find_program('grep', required: true)
mysql_config = find_program('mysql_config', required: false)
Expand Down

0 comments on commit e12ea0d

Please sign in to comment.