Commit a4ea97d6 authored by Daiki Ueno's avatar Daiki Ueno

build: Simplify pathname handling

This switches to using relative paths as much as possible, and the "/"
shorthand for join_paths.
parent 555407a4
......@@ -14,5 +14,5 @@ secret_tool_man = custom_target('secret-tool.1',
],
build_by_default: true,
install: true,
install_dir: join_paths(libsecret_prefix, get_option('mandir'), 'man1'),
install_dir: libsecret_prefix / get_option('mandir') / 'man1',
)
installed_headers_subdir = join_paths('libsecret-@0@'.format(api_version_major), 'libsecret')
installed_headers_subdir = 'libsecret-@0@'.format(api_version_major) / 'libsecret'
libsecret_sources = [
'secret-attributes.c',
......@@ -57,7 +57,7 @@ _enums_generated = gnome.mkenums('secret-enum-types',
c_template: 'secret-enum-types.c.template',
h_template: 'secret-enum-types.h.template',
install_header: true,
install_dir: join_paths(includedir, installed_headers_subdir),
install_dir: libsecret_prefix / includedir / installed_headers_subdir,
)
libsecret_dependencies = [
......@@ -136,7 +136,7 @@ libsecret_gir = gnome.generate_gir(libsecret,
if with_vapi
libsecret_vapi = gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
sources: libsecret_gir[0],
metadata_dirs: join_paths(meson.source_root(), 'libsecret'),
metadata_dirs: meson.source_root() / 'libsecret',
packages: [ 'gobject-2.0', 'gio-2.0' ],
install: true,
)
......@@ -146,11 +146,11 @@ endif
pc_conf = configuration_data()
pc_conf.set('prefix', libsecret_prefix)
pc_conf.set('exec_prefix', '${prefix}')
pc_conf.set('libdir', join_paths('${prefix}', get_option('libdir')))
pc_conf.set('includedir', join_paths('${prefix}', get_option('includedir')))
pc_conf.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
pc_conf.set('libdir', '${prefix}' / get_option('libdir'))
pc_conf.set('includedir', '${prefix}' / get_option('includedir'))
pc_conf.set('datarootdir', '${prefix}' / get_option('datadir'))
pc_conf.set('datadir', '${datarootdir}')
pc_conf.set('sysconfdir', join_paths('${prefix}', get_option('sysconfdir')))
pc_conf.set('sysconfdir', '${prefix}' / get_option('sysconfdir'))
pc_conf.set('SECRET_MAJOR', api_version_major)
pc_conf.set('VERSION', meson.project_version())
......@@ -159,14 +159,14 @@ configure_file(
output: 'libsecret-@0@.pc'.format(api_version_major),
configuration: pc_conf,
install: true,
install_dir: join_paths(libdir, 'pkgconfig'),
install_dir: libsecret_prefix / libdir / 'pkgconfig',
)
configure_file(
input: 'libsecret-unstable.pc.in',
output: 'libsecret-unstable.pc',
configuration: pc_conf,
install: true,
install_dir: join_paths(libdir, 'pkgconfig'),
install_dir: libsecret_prefix / libdir / 'pkgconfig',
)
# Tests
......
......@@ -25,16 +25,16 @@ with_gtkdoc = get_option('gtk_doc')
# Some variables
config_h_dir = include_directories('.')
libsecret_prefix = get_option('prefix')
datadir = join_paths(libsecret_prefix, get_option('datadir'))
includedir = join_paths(libsecret_prefix, get_option('includedir'))
bindir = join_paths(libsecret_prefix, get_option('bindir'))
libdir = join_paths(libsecret_prefix, get_option('libdir'))
libexecdir = join_paths(libsecret_prefix, get_option('libexecdir'))
locale_dir = join_paths(libsecret_prefix, get_option('localedir'))
pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name())
sysconfdir = join_paths(libsecret_prefix, get_option('sysconfdir'))
po_dir = join_paths(meson.source_root(), 'po')
datadir = get_option('datadir')
includedir = get_option('includedir')
bindir = get_option('bindir')
libdir = get_option('libdir')
libexecdir = get_option('libexecdir')
locale_dir = get_option('localedir')
pkgdatadir = datadir / meson.project_name()
pkglibdir = libdir / meson.project_name()
sysconfdir = get_option('sysconfdir')
po_dir = meson.source_root() / 'po'
# Dependencies
min_glib_version = '2.44'
......@@ -68,7 +68,7 @@ math = meson.get_compiler('c').find_library('m')
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
conf.set_quoted('LOCALEDIR', locale_dir)
conf.set_quoted('LOCALEDIR', libsecret_prefix / locale_dir)
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_STRING', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment