aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build28
1 files changed, 20 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 9103ada4..ce821a67 100644
--- a/meson.build
+++ b/meson.build
@@ -134,13 +134,24 @@ libsylph_dep = declare_dependency(include_directories : libsylph_includes,
# Instructions for building sylpheed executable
flex = find_program('flex')
-
-lgen = generator(flex, output : ['@BASENAME@.c', '@BASENAME@.h'],
- arguments : ['-o', '@OUTPUT0@',
- '--header-file=@OUTPUT1@',
- '@INPUT@'])
-
-quote_fmt_lex_c = lgen.process('src/quote_fmt_lex.l')
+bison = find_program('bison')
+
+quote_fmt_parse_c = custom_target('quote_fmt_parse.tab.c',
+ output : ['quote_fmt_parse.tab.c', 'quote_fmt_parse.tab.h'],
+ input : 'src/quote_fmt_parse.y',
+ command : [bison, '--defines=@OUTPUT1@',
+ '-p', 'quote_fmt',
+ '--output=@OUTPUT0@',
+ '@INPUT@'])
+
+quote_fmt_c = custom_target('quote_fmt.c',
+ output : ['quote_fmt.c', 'quote_fmt.h'],
+ input : 'src/quote_fmt_lex.l',
+ depends : quote_fmt_parse_c,
+ command : [flex, '--outfile=@OUTPUT0@',
+ '--header-file=@OUTPUT1@',
+ '-P', 'quote_fmt',
+ '@INPUT@'])
executable('sylpheed',
['src/about.c',
@@ -210,7 +221,8 @@ executable('sylpheed',
'src/prefs_ui.c',
'src/printing.c',
'src/progressdialog.c',
- quote_fmt_lex_c,
+ quote_fmt_parse_c,
+ quote_fmt_c,
'src/query_search.c',
'src/quick_search.c',
'src/rfc2015.c',