meson: use jinja2 for the gperf template

Jinja2 inserts an empty line after the first macro body, which I don't know how
to get rid of. Only the first macro causes problems: the other ones don't have
conditional statements at the end and the issue does not occur. As a work-around
I moved ProtectHostname to the end of the first macro.

Output is identical, except for horizontal whitespace and change in position of
ProtectHostname.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-05-16 14:55:43 +02:00
committed by Yu Watanabe
parent c900d89faa
commit 997f52a5d1
2 changed files with 268 additions and 259 deletions

View File

@@ -132,9 +132,9 @@ endif
load_fragment_gperf_gperf = custom_target(
'load-fragment-gperf.gperf',
input : 'load-fragment-gperf.gperf.m4',
input : 'load-fragment-gperf.gperf.in',
output: 'load-fragment-gperf.gperf',
command : [meson_apply_m4, config_h, '@INPUT@'],
command : [meson_render_jinja2, config_h, '@INPUT@'],
capture : true)
load_fragment_gperf_c = custom_target(