'README',
input : 'README.in',
output : 'README',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('HAVE_SYSV_COMPAT') == 1,
install_dir : sysvinit_path)
'locale.conf',
input : 'locale.conf.in',
output : 'locale.conf',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : true,
install_dir : factory_etc_dir)
'custom-entities.ent',
input : 'custom-entities.ent.in',
output : 'custom-entities.ent',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'])
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
man_pages = []
html_pages = []
add_project_arguments('-include', 'config.h', language : 'c')
+jinja2_cmdline = [meson_render_jinja2, config_h, version_h]
+
############################################################
# binaries that have --help and are intended for use by humans,
file,
input : file + '.in',
output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : true,
install_dir : udevrulesdir)
endforeach
'systemctl',
input : 'systemctl.in',
output : 'systemctl',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : bashcompletiondir != 'no',
install_dir : bashcompletiondir)
'_systemctl',
input : '_systemctl.in',
output : '_systemctl',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : zshcompletiondir != 'no',
install_dir : zshcompletiondir)
'load-fragment-gperf.gperf',
input : 'load-fragment-gperf.gperf.in',
output: 'load-fragment-gperf.gperf',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'])
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
load_fragment_gperf_c = custom_target(
'load-fragment-gperf.c',
file,
input : file + '.in',
output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no'),
install_dir : dir)
endforeach
file,
input : file + '.in',
output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : tuple[1],
install_dir : pkgsysconfdir)
endforeach
'libsystemd.pc',
input : 'libsystemd.pc.in',
output : 'libsystemd.pc',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : pkgconfiglibdir != 'no',
install_dir : pkgconfiglibdir)
'libudev.pc',
input : 'libudev.pc.in',
output : 'libudev.pc',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : pkgconfiglibdir != 'no',
install_dir : pkgconfiglibdir)
file,
input : file + '.in',
output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : tuple[2] and install,
install_dir : dir)
endforeach
'resolved.conf',
input : 'resolved.conf.in',
output : 'resolved.conf',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_RESOLVE') == 1 and install_sysconfdir_samples,
install_dir : pkgsysconfdir)
file,
input : file + '.in',
output : file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : tuple[1],
install_dir : tuple.length() > 2 ? tuple[2] : '',
build_by_default : true)
'timesyncd.conf',
input : 'timesyncd.conf.in',
output : 'timesyncd.conf',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
install_dir : pkgsysconfdir)
'udev.pc',
input : 'udev.pc.in',
output : 'udev.pc',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : pkgconfigdatadir != 'no',
install_dir : pkgconfigdatadir)
'90-vconsole.rules',
input : '90-vconsole.rules.in',
output : '90-vconsole.rules',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_VCONSOLE') == 1,
install_dir : udevrulesdir)
'50-coredump.conf',
input : '50-coredump.conf.in',
output : '50-coredump.conf',
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_COREDUMP') == 1,
install_dir : sysctldir)
file,
input : file + '.in',
output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : tuple[1],
install_dir : sysusersdir)
endforeach
pair[0],
input : pair[0] + '.in',
output: pair[0],
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : enable_tmpfiles,
install_dir : tmpfilesdir)
else
if __name__ == '__main__':
defines = parse_config_h(sys.argv[1])
- output = render(sys.argv[2], defines)
- with open(sys.argv[3], 'w') as f:
+ defines.update(parse_config_h(sys.argv[2]))
+ output = render(sys.argv[3], defines)
+ with open(sys.argv[4], 'w') as f:
f.write(output)
f.write('\n')
- info = os.stat(sys.argv[2])
- os.chmod(sys.argv[3], info.st_mode)
+ info = os.stat(sys.argv[3])
+ os.chmod(sys.argv[4], info.st_mode)
file,
input : file + '.in',
output : file,
- command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : install,
install_dir : systemunitdir)