[geary/mjog/composer-context-loading-fixes: 2/14] build: Reduce verbosity of meson vars by removing `geary_` prefixes




commit abf10e58c1bb5a712c6c44b0df1f59bbf6f261ca
Author: Michael Gratton <mike vee net>
Date:   Mon Aug 10 16:53:39 2020 +1000

    build: Reduce verbosity of meson vars by removing `geary_` prefixes

 src/client/meson.build        | 34 +++++++++++++---------------
 src/client/plugin/meson.build |  4 ++--
 src/console/meson.build       | 12 +++++-----
 src/engine/meson.build        | 52 +++++++++++++++++++++----------------------
 src/mailer/meson.build        | 12 +++++-----
 src/meson.build               | 32 +++++++++++++-------------
 test/data/meson.build         |  2 +-
 test/meson.build              | 50 ++++++++++++++++++++---------------------
 8 files changed, 98 insertions(+), 100 deletions(-)
---
diff --git a/src/client/meson.build b/src/client/meson.build
index 20eb6fc78..2c530049b 100644
--- a/src/client/meson.build
+++ b/src/client/meson.build
@@ -1,16 +1,16 @@
 # Geary client
 
-geary_client_package_name = 'geary-client'
-geary_client_api_version = '.'.join([
+client_package_name = 'geary-client'
+client_api_version = '.'.join([
   geary_version.split('.')[0],
   geary_version.split('.')[1]
 ])
-geary_client_package = '@0@-@1@'.format(
-  geary_client_package_name,
-  geary_client_api_version
+client_package = '@0@-@1@'.format(
+  client_package_name,
+  client_api_version
 )
 
-geary_client_vala_sources = files(
+client_vala_sources = files(
   'application/application-account-context.vala',
   'application/application-attachment-manager.vala',
   'application/application-avatar-store.vala',
@@ -145,12 +145,12 @@ geary_client_vala_sources = files(
   'util/util-migrate.vala',
 )
 
-geary_client_dependencies = [
+client_dependencies = [
   enchant,
   folks,
   gck,
   gcr,
-  geary_engine_dep,
+  engine_dep,
   gee,
   gio,
   gmime,
@@ -170,32 +170,30 @@ geary_client_dependencies = [
   webkit2gtk,
 ]
 
-geary_client_vala_args = geary_vala_args
-
 # Enable shared shecondary process if available.
 # See issues #558 and #559
 webkit_version = webkit2gtk.version().split('.')
 if webkit_version[0].to_int() <= 2 and webkit_version[1].to_int() <= 24
   message('Enabling WebKitGTK shared process model')
-  geary_client_vala_args += [
+  client_vala_args += [
     '-D', 'HAS_WEBKIT_SHARED_PROC'
   ]
 endif
 
 # Main client application library
-geary_client_lib = shared_library(
-  geary_client_package,
-  geary_client_vala_sources + geary_resources,
-  dependencies: geary_client_dependencies,
+client_lib = shared_library(
+  client_package,
+  client_vala_sources + geary_resources,
+  dependencies: client_dependencies,
   include_directories: config_h_dir,
-  vala_args: geary_client_vala_args,
+  vala_args: client_vala_args,
   c_args: geary_c_args,
   install: true,
   install_dir: client_lib_dir,
 )
 
-geary_client_dep = declare_dependency(
-  link_with: geary_client_lib,
+client_dep = declare_dependency(
+  link_with: client_lib,
   include_directories: include_directories('.'),
 )
 
diff --git a/src/client/plugin/meson.build b/src/client/plugin/meson.build
index 6197a5f05..e6a0cf5f8 100644
--- a/src/client/plugin/meson.build
+++ b/src/client/plugin/meson.build
@@ -6,8 +6,8 @@
 plugin_dependencies = [
   folks,
   gdk,
-  geary_client_dep,
-  geary_engine_dep,
+  client_dep,
+  engine_dep,
   gee,
   gmime,
   goa,
diff --git a/src/console/meson.build b/src/console/meson.build
index b6c2a4baf..39864e109 100644
--- a/src/console/meson.build
+++ b/src/console/meson.build
@@ -1,18 +1,18 @@
-geary_console_sources = files(
+console_sources = files(
   'main.vala',
 )
 
-geary_console_dependencies = [
+console_dependencies = [
   gtk,
   gee,
   gmime,
   webkit2gtk,
-  geary_engine_dep,
+  engine_dep,
 ]
 
-geary_console = executable('geary-console',
-  geary_console_sources,
-  dependencies: geary_console_dependencies,
+console = executable('geary-console',
+  console_sources,
+  dependencies: console_dependencies,
   include_directories: config_h_dir,
   vala_args: geary_vala_args,
   c_args: geary_c_args,
diff --git a/src/engine/meson.build b/src/engine/meson.build
index 4ed5d8373..5ef60a199 100644
--- a/src/engine/meson.build
+++ b/src/engine/meson.build
@@ -1,5 +1,5 @@
 # Geary engine
-geary_engine_vala_sources = files(
+engine_vala_sources = files(
   'api/geary.vala',
   'api/geary-abstract-local-folder.vala',
   'api/geary-account.vala',
@@ -312,11 +312,11 @@ geary_engine_vala_sources = files(
   'util/util-trillian.vala',
 )
 
-geary_engine_sources = [
-  geary_engine_vala_sources,
+engine_sources = [
+  engine_vala_sources,
 ]
 
-geary_engine_dependencies = [
+engine_dependencies = [
   gee,
   gio,
   glib,
@@ -328,46 +328,46 @@ geary_engine_dependencies = [
 ]
 
 if libunwind_dep.found()
-  geary_engine_dependencies += libunwind
+  engine_dependencies += libunwind
 endif
 
-build_dir = meson.current_build_dir()
+engine_build_dir = meson.current_build_dir()
 
 # Generate internal VAPI for unit testing. See Meson issue
 # https://github.com/mesonbuild/meson/issues/1781 for official
 # internal VAPI support.
-geary_engine_vala_args = geary_vala_args
-geary_engine_vala_args += [
-  '--internal-header=@0@/geary-engine-internal.h'.format(build_dir),
-  '--internal-vapi=@0@/geary-engine-internal.vapi'.format(build_dir)
+engine_vala_args = geary_vala_args
+engine_vala_args += [
+  '--internal-header=@0@/geary-engine-internal.h'.format(engine_build_dir),
+  '--internal-vapi=@0@/geary-engine-internal.vapi'.format(engine_build_dir)
 ]
 
 if libunwind_dep.found()
-  geary_engine_vala_args += [
+  engine_vala_args += [
     '-D', 'HAVE_LIBUNWIND',
   ]
 endif
 
 if get_option('tnef-support')
-  geary_engine_dependencies += libytnef
-  geary_engine_vala_args += [
+  engine_dependencies += libytnef
+  engine_vala_args += [
     '-D', 'WITH_TNEF_SUPPORT'
   ]
 endif
 
-geary_engine_lib = static_library('geary-engine',
-  geary_engine_sources,
-  dependencies: geary_engine_dependencies,
+engine_lib = static_library('geary-engine',
+  engine_sources,
+  dependencies: engine_dependencies,
   include_directories: config_h_dir,
-  vala_args: geary_engine_vala_args,
+  vala_args: engine_vala_args,
   c_args: geary_c_args,
 )
 
 # Dummy target to tell Meson about the internal VAPI given the
 # workaround above, and fix the VAPI header to work around
 # GNOME/vala#358
-geary_engine_internal_header_fixup = custom_target(
-  'geary_engine_internal_header_fixup',
+engine_internal_header_fixup = custom_target(
+  'engine_internal_header_fixup',
   output: [
     'geary-engine-internal.h',
     'geary-engine-internal.vapi',
@@ -378,27 +378,27 @@ geary_engine_internal_header_fixup = custom_target(
     's/geary-engine.h/geary-engine-internal.h/g',
     '@OUTDIR@/geary-engine-internal.vapi',
   ],
-  depends: geary_engine_lib
+  depends: engine_lib
 )
 
-geary_engine_dep = declare_dependency(
+engine_dep = declare_dependency(
   link_with: [
-    geary_engine_lib,
+    engine_lib,
     sqlite3_unicodesn_lib
   ],
   include_directories: include_directories('.')
 )
 
-geary_engine_internal_dep = declare_dependency(
-  # Can't just include geary_engine_lib in link_with since that will
+engine_internal_dep = declare_dependency(
+  # Can't just include engine_lib in link_with since that will
   # pull in the public header and we get duplicate symbol errors.
   link_args: [
-    '-L' + build_dir,
+    '-L' + engine_build_dir,
     '-lgeary-engine'
   ],
   link_with: [
     sqlite3_unicodesn_lib,
   ],
   include_directories: include_directories('.'),
-  sources: geary_engine_internal_header_fixup
+  sources: engine_internal_header_fixup
 )
diff --git a/src/mailer/meson.build b/src/mailer/meson.build
index 257c007c2..a01032b46 100644
--- a/src/mailer/meson.build
+++ b/src/mailer/meson.build
@@ -1,17 +1,17 @@
-geary_mailer_sources = files(
+mailer_sources = files(
   'main.vala',
 )
 
-geary_mailer_dependencies = [
+mailer_dependencies = [
   gee,
   gmime,
   webkit2gtk,
-  geary_engine_dep,
+  engine_dep,
 ]
 
-geary_mailer = executable('geary-mailer',
-  geary_mailer_sources,
-  dependencies: geary_mailer_dependencies,
+mailer = executable('geary-mailer',
+  mailer_sources,
+  dependencies: mailer_dependencies,
   include_directories: config_h_dir,
   vala_args: geary_vala_args,
   c_args: geary_c_args,
diff --git a/src/meson.build b/src/meson.build
index d13b457f0..f5cbbc4c2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -53,41 +53,41 @@ subdir('client')
 subdir('console')
 subdir('mailer')
 
-geary_web_process_sources = files(
+web_process_sources = files(
   'client/web-process/web-process-extension.vala',
   'client/util/util-js.vala',
 )
 
 # Web process extension library
-geary_web_process = library('geary-web-process',
-  geary_web_process_sources,
+web_process = library('geary-web-process',
+  web_process_sources,
   dependencies: [
-    geary_engine_dep,
+    engine_dep,
     gee,
     gmime,
     webkit2gtk_web_extension,
   ],
   include_directories: config_h_dir,
-  vala_args: geary_client_vala_args,
+  vala_args: client_vala_args,
   c_args: geary_c_args,
   install: true,
   install_dir: web_extensions_dir
 )
 
 # Now finally, make the geary executable
-geary_bin_sources = files(
+bin_sources = files(
   'client' / 'application' / 'main.vala',
 )
 
-geary_bin_sources += [
+bin_sources += [
   geary_compiled_schema,
   geary_resources # Included here so they show up in the executable.
 ]
-geary_bin_dependencies = [
+bin_dependencies = [
   folks,
   gdk,
-  geary_client_dep,
-  geary_engine_dep,
+  client_dep,
+  engine_dep,
   gee,
   gmime,
   goa,
@@ -100,9 +100,9 @@ geary_bin_dependencies = [
   webkit2gtk,
 ]
 
-geary_bin = executable('geary',
-  geary_bin_sources,
-  dependencies: geary_bin_dependencies,
+bin = executable('geary',
+  bin_sources,
+  dependencies: bin_dependencies,
   vala_args: geary_vala_args,
   c_args: geary_c_args,
   install: true,
@@ -142,10 +142,10 @@ endforeach
 valadoc_dep_args += [ '--pkg', 'posix' ]
 
 if enable_valadoc
-  geary_docs = custom_target('valadoc',
+  docs = custom_target('valadoc',
     build_by_default: true,
-    depends: [geary_client_lib, geary_engine_lib],
-    input: geary_client_vala_sources + geary_engine_sources,
+    depends: [client_lib, engine_lib],
+    input: client_vala_sources + engine_sources,
     output: 'valadoc',
     command: [ valadoc,
       '--verbose',
diff --git a/test/data/meson.build b/test/data/meson.build
index a4cda4d6e..b89c692ef 100644
--- a/test/data/meson.build
+++ b/test/data/meson.build
@@ -1,3 +1,3 @@
-geary_test_engine_resources = gnome.compile_resources('org.gnome.GearyTest',
+test_engine_resources = gnome.compile_resources('org.gnome.GearyTest',
   files('org.gnome.GearyTest.gresource.xml'),
 )
diff --git a/test/meson.build b/test/meson.build
index b529ab464..86977db09 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -17,7 +17,7 @@ libmock_sources = [
   'mock/mock-search-query.vala',
 ]
 
-geary_test_engine_sources = [
+test_engine_sources = [
   'test-case.vala',
   'test-server.vala',
   'test-engine.vala',
@@ -70,10 +70,10 @@ geary_test_engine_sources = [
   'engine/util-string-test.vala',
   'engine/util-timeout-manager-test.vala',
 
-  geary_test_engine_resources
+  test_engine_resources
 ]
 
-geary_test_client_sources = [
+test_client_sources = [
   'test-case.vala',
   'test-client.vala',
 
@@ -97,7 +97,7 @@ geary_test_client_sources = [
   geary_resources
 ]
 
-geary_test_integration_sources = [
+test_integration_sources = [
   'test-case.vala',
   'test-integration.vala',
 
@@ -107,40 +107,40 @@ geary_test_integration_sources = [
 
 # Engine tests
 
-geary_test_engine_dependencies = [
-  geary_engine_internal_dep,
+test_engine_dependencies = [
+  engine_internal_dep,
   vala_unit_dep,
 ]
-geary_test_engine_dependencies += geary_engine_dependencies
+test_engine_dependencies += engine_dependencies
 
-geary_test_engine_vala_args = geary_vala_args
+test_engine_vala_args = geary_vala_args
 
 if get_option('tnef-support')
-  geary_test_engine_dependencies += libytnef
-  geary_test_engine_vala_args += [
+  test_engine_dependencies += libytnef
+  test_engine_vala_args += [
     '-D', 'WITH_TNEF_SUPPORT'
   ]
 endif
 
-geary_test_engine_bin = executable('test-engine',
-  geary_test_engine_sources + libmock_sources,
-  dependencies: geary_test_engine_dependencies,
+test_engine_bin = executable('test-engine',
+  test_engine_sources + libmock_sources,
+  dependencies: test_engine_dependencies,
   include_directories: config_h_dir,
-  vala_args: geary_test_engine_vala_args,
+  vala_args: test_engine_vala_args,
   c_args: geary_c_args,
 )
 
 # Client tests
 
-geary_test_client_dependencies = [
-  geary_client_dep,
+test_client_dependencies = [
+  client_dep,
   vala_unit_dep,
 ]
-geary_test_client_dependencies += geary_client_dependencies
+test_client_dependencies += client_dependencies
 
-geary_test_client_bin = executable('test-client',
-  geary_test_client_sources + libmock_sources,
-  dependencies: geary_test_client_dependencies,
+test_client_bin = executable('test-client',
+  test_client_sources + libmock_sources,
+  dependencies: test_client_dependencies,
   include_directories: config_h_dir,
   vala_args: geary_vala_args,
   c_args: geary_c_args,
@@ -148,10 +148,10 @@ geary_test_client_bin = executable('test-client',
 
 # Integration tests
 
-geary_test_integration_bin = executable('test-integration',
-  geary_test_integration_sources,
+test_integration_bin = executable('test-integration',
+  test_integration_sources,
   dependencies: [
-    geary_engine_dep,
+    engine_dep,
     gee,
     gio,
     gmime,
@@ -163,5 +163,5 @@ geary_test_integration_bin = executable('test-integration',
   c_args: geary_c_args,
 )
 
-test('engine-tests', geary_test_engine_bin)
-test('client-tests', geary_test_client_bin)
+test('engine-tests', test_engine_bin)
+test('client-tests', test_client_bin)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]