]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: restore specifications of dependency on version_h
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 28 Aug 2023 11:46:24 +0000 (14:46 +0300)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 28 Aug 2023 13:06:23 +0000 (14:06 +0100)
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
src/boot/efi/meson.build

index 22dcf2d95062a8626d96f837202fa846f2c64c80..910e06c7834b11f396a8ee71289733baca913c39 100644 (file)
@@ -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 = []
index eccec4d493511ff065779f79333794a41d6c3ed4..4abd9d5c49a8a5a692a809a6c2427d04a0278c31 100644 (file)
@@ -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