From 5c25f9dbc571fae0cddb8a5970e39c65d93943c7 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 6 Mar 2024 15:16:52 +0100 Subject: [PATCH] meson: Remove version_h dependency from jinja2_cmdline version_h includes GIT_VERSION which only makes sense for C files which aren't preprocessed by jinja2 so remove the argument. The end result of this change is that the man pages are not recompiled anymore every time GIT_VERSION changes. --- meson.build | 2 +- tools/meson-render-jinja2.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index dc7e2b9a7b9..7ac331fb36a 100644 --- a/meson.build +++ b/meson.build @@ -1887,7 +1887,7 @@ config_h = configure_file( userspace_c_args += ['-include', 'config.h'] -jinja2_cmdline = [meson_render_jinja2, config_h, version_h] +jinja2_cmdline = [meson_render_jinja2, config_h] userspace = declare_dependency( compile_args : userspace_c_args, diff --git a/tools/meson-render-jinja2.py b/tools/meson-render-jinja2.py index 3a3d912d8f5..977de79378a 100755 --- a/tools/meson-render-jinja2.py +++ b/tools/meson-render-jinja2.py @@ -33,12 +33,11 @@ def render(filename, defines): def main(): defines = parse_config_h(sys.argv[1]) - defines.update(parse_config_h(sys.argv[2])) - output = render(sys.argv[3], defines) - with open(sys.argv[4], 'w') as f: + output = render(sys.argv[2], defines) + with open(sys.argv[3], 'w') as f: f.write(output) - info = os.stat(sys.argv[3]) - os.chmod(sys.argv[4], info.st_mode) + info = os.stat(sys.argv[2]) + os.chmod(sys.argv[3], info.st_mode) if __name__ == '__main__': main()