[eog: 3/11] build: Improve custom targets generation
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog: 3/11] build: Improve custom targets generation
- Date: Wed, 29 Dec 2021 14:45:58 +0000 (UTC)
commit 7aad17c1471792590af6f614e8fbc324f381cc1d
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Wed Oct 27 09:43:07 2021 +0200
build: Improve custom targets generation
Since meson 0.60, the name in `custom_target`, and derivatives, is
optional[0], although the implementation has produced some errors at
the moment[1].
Due to this, the name has been removed when possible.
When possible, two pass targets, where there is a first pass to
replace variables, and second pass to translate files, have been
modified to be avoid extra build commands.
The `@BASENAME@` token has also been used as an approach to remove
the `in` suffix.
[0] https://mesonbuild.com/Release-notes-for-0-60-0.html#optional-custom_target-name
[1] https://github.com/mesonbuild/meson/issues/9441
data/meson.build | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 0228c3c6..7f76c582 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -14,28 +14,22 @@ resource_data = files(
'popup-menus.ui',
)
-desktop = 'org.gnome.eog.desktop'
-
-desktop_in = configure_file(
- input: desktop + '.in.in',
- output: '@BASENAME@',
- configuration: {'VERSION': eog_version, 'icon': application_id },
-)
-
i18n.merge_file(
- type: 'desktop',
- input: desktop_in,
- output: desktop,
+ input: configure_file(
+ input: 'org.gnome.eog.desktop.in.in',
+ output: '@BASENAME@',
+ configuration: {'VERSION': eog_version, 'icon': application_id},
+ ),
+ output: '@BASENAME@',
po_dir: po_dir,
+ type: 'desktop',
install: true,
install_dir: eog_datadir / 'applications',
)
-appdata = 'eog.appdata.xml'
-
i18n.merge_file(
- input: appdata + '.in',
- output: appdata,
+ input: 'eog.appdata.xml.in',
+ output: '@BASENAME@',
po_dir: po_dir,
install: true,
install_dir: eog_datadir / 'metainfo',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]