[gedit] build: use meson.project_name() instead of a global variable
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] build: use meson.project_name() instead of a global variable
- Date: Wed, 4 Dec 2019 12:48:31 +0000 (UTC)
commit 189c24b649b0e98655e737f8737d69b4f1334355
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Dec 4 13:07:57 2019 +0100
build: use meson.project_name() instead of a global variable
data/meson.build | 2 +-
docs/reference/meson.build | 4 ++--
gedit/meson.build | 6 +++---
help/meson.build | 2 +-
meson.build | 11 +++++------
po/meson.build | 2 +-
6 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index cd00137de..2261d028a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -77,7 +77,7 @@ foreach plugin_name:active_plugins
endforeach
gschema_in = configuration_data()
-gschema_in.set('GETTEXT_PACKAGE', package_name)
+gschema_in.set('GETTEXT_PACKAGE', meson.project_name())
gschema_in.set('ACTIVE_PLUGINS', ', '.join(quoted_plugins))
gschema_file = configure_file(
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 6fc7d3288..015b28498 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -88,7 +88,7 @@ libgedit_reference_fixxref_args = [
]
gnome.gtkdoc(
- package_name,
+ meson.project_name(),
main_sgml: 'gedit-docs.xml',
src_dir: join_paths(srcdir, 'gedit'),
dependencies: gedit_doc_dep,
@@ -102,6 +102,6 @@ gnome.gtkdoc(
install_dir: join_paths(
gtkdocdir,
'html',
- package_name,
+ meson.project_name(),
)
)
diff --git a/gedit/meson.build b/gedit/meson.build
index e93537eeb..89812ad92 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -238,7 +238,7 @@ if generate_gir == true
]
libgedit_vapi = gnome.generate_vapi(
- package_name,
+ meson.project_name(),
sources: libgedit_gir.get(0),
packages: libgedit_vapi_packages,
install: true,
@@ -255,7 +255,7 @@ libgedit_dep = declare_dependency(
)
libgedit_pc = pkg.generate(
- name: package_name,
+ name: meson.project_name(),
description: 'GNOME text editor',
requires: ['gtksourceview-4', 'libpeas-1.0', 'libpeas-gtk-1.0'],
version: meson.project_version(),
@@ -306,7 +306,7 @@ gedit_deps = [
]
gedit_exe = executable(
- package_name,
+ meson.project_name(),
gedit_sources,
dependencies: gedit_deps,
c_args: gedit_c_args,
diff --git a/help/meson.build b/help/meson.build
index 73b30fc49..f2cb56331 100644
--- a/help/meson.build
+++ b/help/meson.build
@@ -47,7 +47,7 @@ gedit_help_media = [
]
gnome.yelp(
- package_name,
+ meson.project_name(),
sources: gedit_help_sources,
media: gedit_help_media,
symlink_media: true,
diff --git a/meson.build b/meson.build
index cf52c810d..6aa1c1c76 100644
--- a/meson.build
+++ b/meson.build
@@ -11,8 +11,7 @@ python = import('python')
api_version = '3.36'
-package_name = meson.project_name()
-package_string = '@0@-@1@'.format(package_name, api_version)
+package_string = '@0@-@1@'.format(meson.project_name(), api_version)
# Paths
rootdir = include_directories('.')
@@ -29,8 +28,8 @@ libexecdir = join_paths(prefix, get_option('libexecdir'))
datadir = join_paths(prefix, get_option('datadir'))
pkgincludedir = join_paths(includedir, package_string)
pkgconfigdir = join_paths(libdir, 'pkgconfig')
-pkglibdir = join_paths(libdir, package_name)
-pkgdatadir = join_paths(datadir, package_name)
+pkglibdir = join_paths(libdir, meson.project_name())
+pkgdatadir = join_paths(datadir, meson.project_name())
dbusdir = join_paths(datadir, 'dbus-1')
glibdir = join_paths(datadir, 'glib-2.0')
@@ -102,10 +101,10 @@ else
endif
config_h = configuration_data()
-config_h.set_quoted('PACKAGE_NAME', package_name)
+config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('PACKAGE_STRING', package_string)
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
-config_h.set_quoted('GETTEXT_PACKAGE', package_name)
+config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_h.set_quoted('LOCALEDIR', localdir)
config_h.set_quoted('LIBDIR', libdir)
config_h.set_quoted('DATADIR', datadir)
diff --git a/po/meson.build b/po/meson.build
index 0e5cd0b08..75c9c975e 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,5 +1,5 @@
i18n.gettext(
- package_name,
+ meson.project_name(),
preset: 'glib',
args: [
'--keyword=Description',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]