Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame^] | 1 | From b1df1ed3a21b8ef0244102043a8fb88b0ccc3f91 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 17 Apr 2023 11:30:21 -0700 |
| 4 | Subject: [PATCH] meson: Avoid absolute buildtime paths in generated headers |
| 5 | |
| 6 | using meson.project_source_root() means the path emitted to include .h |
| 7 | files is absolute and it makes its way into PN-src as well, which infact |
| 8 | is not going to work if the -src package was used to re-build this in a |
| 9 | different build path. Therefore use relative path which is '.' and |
| 10 | relative to ${S} |
| 11 | |
| 12 | Changes |
| 13 | include "<abspath>/plugins/acpi-dmar/fu-acpi-dmar-plugin.h" |
| 14 | to |
| 15 | include "./plugins/acpi-dmar/fu-acpi-dmar-plugin.h" |
| 16 | |
| 17 | in generated build/src/fu-plugin-builtin.h |
| 18 | |
| 19 | Upstream-Status: Pending |
| 20 | |
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 22 | --- |
| 23 | src/meson.build | 2 +- |
| 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 25 | |
| 26 | diff --git a/src/meson.build b/src/meson.build |
| 27 | index b9f6736..bb856ea 100644 |
| 28 | --- a/src/meson.build |
| 29 | +++ b/src/meson.build |
| 30 | @@ -188,7 +188,7 @@ plugins_hdr = custom_target('fwupd-generate-plugins-header', |
| 31 | command : [ |
| 32 | join_paths(meson.project_source_root(), 'contrib', 'generate-plugins-header.py'), |
| 33 | '@OUTPUT@', |
| 34 | - meson.project_source_root(), |
| 35 | + '.', |
| 36 | ','.join(plugin_names), |
| 37 | ], |
| 38 | ) |
| 39 | -- |
| 40 | 2.40.0 |
| 41 | |