Skip to content

Commit

Permalink
build: Improve custom targets generation
Browse files Browse the repository at this point in the history
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] mesonbuild/meson#9441
  • Loading branch information
inigomartinez authored and fxri committed Dec 29, 2021
1 parent 0f5c03b commit 7aad17c
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7aad17c

Please sign in to comment.