diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-08-11 13:57:42 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2018-08-11 22:56:33 +0200 |
commit | 11085f91c24dd895dfd1e9d02a71f1a3346e3c00 (patch) | |
tree | 8e56a2f455e0a1335c912674759e8bf0c3ec7b6a | |
parent | 4ef809a42f55adec9d32210867028aa502639a88 (diff) | |
download | dconf-11085f91c24dd895dfd1e9d02a71f1a3346e3c00.tar.gz |
build: Do not make heavy use of project_name
The current meson build files make heavy use of meson's
`project_name` function. However this makes difficult for any
developer to find for given program/library/file names. The project
name is also never going to change.
Due to this reason these calls have been changed for `dconf` itself.
-rw-r--r-- | bin/meson.build | 2 | ||||
-rw-r--r-- | client/meson.build | 28 | ||||
-rw-r--r-- | common/meson.build | 10 | ||||
-rw-r--r-- | docs/meson.build | 8 | ||||
-rw-r--r-- | engine/meson.build | 6 | ||||
-rw-r--r-- | gdbus/meson.build | 14 | ||||
-rw-r--r-- | gsettings/meson.build | 6 | ||||
-rw-r--r-- | gvdb/meson.build | 4 | ||||
-rw-r--r-- | shm/meson.build | 10 | ||||
-rw-r--r-- | tests/meson.build | 2 |
10 files changed, 37 insertions, 53 deletions
diff --git a/bin/meson.build b/bin/meson.build index dc220cc..bb6a5d5 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -12,7 +12,7 @@ deps = [ ] executable( - meson.project_name(), + 'dconf', sources, include_directories: top_inc, dependencies: deps, diff --git a/client/meson.build b/client/meson.build index a526c11..776665e 100644 --- a/client/meson.build +++ b/client/meson.build @@ -2,21 +2,21 @@ client_inc = include_directories('.') install_headers( 'dconf.h', - subdir: meson.project_name() + subdir: 'dconf' ) install_headers( 'dconf-client.h', - subdir: join_paths(meson.project_name(), 'client') + subdir: join_paths('dconf', 'client') ) -name = meson.project_name() + '-client' +sources = files('dconf-client.c') -cflags = '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()) +cflags = '-DG_LOG_DOMAIN="dconf"' libdconf_client = static_library( - name, - sources: name + '.c', + 'dconf-client', + sources: sources, include_directories: top_inc, dependencies: libdconf_gdbus_thread_dep, c_args: cflags, @@ -29,8 +29,8 @@ libdconf_client_dep = declare_dependency( ) libdconf = shared_library( - meson.project_name(), - sources: name + '.c', + 'dconf', + sources: sources, version: libversion, soversion: soversion, include_directories: top_inc, @@ -48,17 +48,17 @@ libdconf_dep = declare_dependency( pkg.generate( libraries: libdconf, version: meson.project_version(), - name: meson.project_name(), - description: meson.project_name() + ' client library', - filebase: meson.project_name(), - subdirs: meson.project_name(), + name: 'dconf', + description: 'dconf client library', + filebase: 'dconf', + subdirs: 'dconf', requires: 'gio-2.0 ' + gio_req_version, variables: 'exec_prefix=${prefix}' ) -libdconf_vapi = files(meson.project_name() + '.vapi') +libdconf_vapi = files('dconf.vapi') -vapi_data = libdconf_vapi + files(meson.project_name() + '.deps') +vapi_data = libdconf_vapi + files('dconf.deps') install_data( vapi_data, diff --git a/common/meson.build b/common/meson.build index 51eb939..00f27ad 100644 --- a/common/meson.build +++ b/common/meson.build @@ -8,21 +8,19 @@ headers = files( install_headers( headers, - subdir: join_paths(meson.project_name(), 'common') + subdir: join_paths('dconf', 'common') ) -name = meson.project_name() + '-common' - sources = files( 'dconf-changeset.c', 'dconf-error.c', 'dconf-paths.c' ) -cflags = ['-DG_LOG_DOMAIN="@0@"'.format(meson.project_name())] +cflags = ['-DG_LOG_DOMAIN="dconf"'] libdconf_common = static_library( - name, + 'dconf-common', sources: sources, include_directories: top_inc, dependencies: glib_dep, @@ -38,7 +36,7 @@ libdconf_common_dep = declare_dependency( cflags += cc.get_supported_arguments('-fvisibility=hidden') libdconf_common_hidden = static_library( - name + '-hidden', + 'dconf-common-hidden', sources: sources, include_directories: top_inc, dependencies: glib_dep, diff --git a/docs/meson.build b/docs/meson.build index ed3e45a..46905fd 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,16 +1,16 @@ if get_option('gtk_doc') gnome.gtkdoc( - meson.project_name(), - main_xml: meson.project_name() + '-docs.xml', + 'dconf', + main_xml: 'dconf-docs.xml', src_dir: [ common_inc, client_inc ], dependencies: libdconf_dep, scan_args: '--rebuild-types', - gobject_typesfile: meson.project_name() + '.types', + gobject_typesfile: 'dconf.types', install: true, - install_dir: join_paths(dconf_prefix, gnome.gtkdoc_html_dir(meson.project_name())) + install_dir: join_paths(dconf_prefix, gnome.gtkdoc_html_dir('dconf')) ) endif diff --git a/engine/meson.build b/engine/meson.build index c4ed442..0705c75 100644 --- a/engine/meson.build +++ b/engine/meson.build @@ -13,14 +13,12 @@ deps = [ libgvdb_dep ] -cflags = '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()) - libdconf_engine = static_library( - meson.project_name() + '-engine', + 'dconf-engine', sources: sources, include_directories: top_inc, dependencies: deps + [libdconf_shm_dep], - c_args: cflags, + c_args: '-DG_LOG_DOMAIN="dconf"', pic: true ) diff --git a/gdbus/meson.build b/gdbus/meson.build index 1aef9fb..666824f 100644 --- a/gdbus/meson.build +++ b/gdbus/meson.build @@ -1,10 +1,8 @@ -name = meson.project_name() + '-gdbus-thread' - -cflags = '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()) +cflags = '-DG_LOG_DOMAIN="dconf"' libdconf_gdbus_thread = static_library( - name, - sources: name + '.c', + 'dconf-gdbus-thread', + sources: 'dconf-gdbus-thread.c', include_directories: top_inc, dependencies: libdconf_engine_dep, c_args: cflags, @@ -16,11 +14,9 @@ libdconf_gdbus_thread_dep = declare_dependency( link_with: libdconf_gdbus_thread ) -name = meson.project_name() + '-gdbus-filter' - libdconf_gdbus_filter = static_library( - name, - sources: name + '.c', + 'dconf-gdbus-filter', + sources: 'dconf-gdbus-filter.c', include_directories: top_inc, dependencies: libdconf_engine_dep, c_args: cflags, diff --git a/gsettings/meson.build b/gsettings/meson.build index c1e9104..29fc7c5 100644 --- a/gsettings/meson.build +++ b/gsettings/meson.build @@ -3,14 +3,12 @@ deps = [ libdconf_gdbus_thread_dep ] -cflags = '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()) - libdconf_settings = shared_library( - meson.project_name() + 'settings', + 'dconfsettings', sources: 'dconfsettingsbackend.c', include_directories: top_inc, dependencies: deps, - c_args: cflags, + c_args: '-DG_LOG_DOMAIN="dconf"', install: true, install_dir: gio_module_dir ) diff --git a/gvdb/meson.build b/gvdb/meson.build index 5010e27..ebd23b4 100644 --- a/gvdb/meson.build +++ b/gvdb/meson.build @@ -7,14 +7,12 @@ deps = [ glib_dep ] -cflags = '-DG_LOG_DOMAIN="gvdb (via @0@)"'.format(meson.project_name()) - libgvdb = static_library( 'gvdb', sources: sources, include_directories: top_inc, dependencies: deps, - c_args: cflags, + c_args: '-DG_LOG_DOMAIN="gvdb (via dconf)"', pic: true ) diff --git a/shm/meson.build b/shm/meson.build index 4f95b98..42fe03a 100644 --- a/shm/meson.build +++ b/shm/meson.build @@ -1,13 +1,9 @@ -name = meson.project_name() + '-shm' - -cflags = '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()) - libdconf_shm = static_library( - name, - sources: name + '.c', + 'dconf-shm', + sources: 'dconf-shm.c', include_directories: top_inc, dependencies: glib_dep, - c_args: cflags, + c_args: '-DG_LOG_DOMAIN="dconf"', pic: true ) diff --git a/tests/meson.build b/tests/meson.build index 83bb446..96e45dc 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -5,7 +5,7 @@ sources = files( ) libdconf_mock = static_library( - meson.project_name() + '-mock', + 'dconf-mock', sources: sources, dependencies: glib_dep ) |