From 56a0b9065e2a13bd07d47045156ad15e05d8d4a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 28 Aug 2023 14:46:24 +0300 Subject: [PATCH] meson: restore specifications of dependency on version_h This partially reverts 3c1eee5beda642707037b189481c3c30d1668da7. I thought that it is not necessary, but https://mesonbuild.com/Reference-manual_functions.html#vcs_tag says: > This method returns a custom_tgt should be used to signal dependencies if > other targets use the file outputted by this. > > For example, if you generate a header with this and want to use that in a > build target, you must add the return value to the sources of that build > target. Without that, Meson will not know the order in which to build the > targets. We can use version_h directly, since we already have it. Hopefully fixes https://github.com/systemd/systemd/issues/28994. --- meson.build | 1 + src/boot/efi/meson.build | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 22dcf2d9506..910e06c7834 100644 --- a/meson.build +++ b/meson.build @@ -1854,6 +1854,7 @@ jinja2_cmdline = [meson_render_jinja2, config_h, version_h] userspace = declare_dependency( compile_args : userspace_c_args, link_args : userspace_c_ld_args, + sources : version_h, ) man_page_depends = [] diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index eccec4d4935..4abd9d5c49a 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -304,6 +304,7 @@ foreach archspec : efi_archspecs 'efi' + archspec['arch'], fundamental_sources, libefi_sources, + version_h, include_directories : efi_includes, c_args : archspec['c_args'], gnu_symbol_visibility : 'hidden', @@ -323,19 +324,19 @@ foreach archspec : efi_archspecs efi_elf_binaries += executable( 'systemd-boot' + archspec['arch'], - sources : systemd_boot_sources, + sources : [systemd_boot_sources, version_h], name_suffix : 'elf', kwargs : kwargs) efi_elf_binaries += executable( 'linux' + archspec['arch'], - sources : stub_sources, + sources : [stub_sources, version_h], name_suffix : 'elf.stub', kwargs : kwargs) efi_elf_binaries += executable( 'addon' + archspec['arch'], - sources : addon_sources, + sources : [addon_sources, version_h], name_suffix : 'elf.stub', kwargs : kwargs) endforeach -- 2.47.3