[atk/docs-fixes: 55/56] Refresh the build



commit a3261f93b9a79a2e3f4aa7b8f88973f46ae3cfb2
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Jun 26 17:11:07 2018 +0100

    Refresh the build
    
    Use a consistent, idiomatic syntax and coding style for the Meson build.

 atk/meson.build      | 90 +++++++++++++++++++++++++++-------------------------
 docs/meson.build     | 49 ++++++++++++----------------
 docs/xml/meson.build |  8 +++--
 meson.build          |  1 +
 tests/meson.build    | 27 +++++++++-------
 5 files changed, 90 insertions(+), 85 deletions(-)
---
diff --git a/atk/meson.build b/atk/meson.build
index 1d2a49c..042cd54 100644
--- a/atk/meson.build
+++ b/atk/meson.build
@@ -34,7 +34,6 @@ atk_sources = [
 ]
 
 atk_headers = [
-  'atk.h',
   'atkaction.h',
   'atkcomponent.h',
   'atkdocument.h',
@@ -43,12 +42,13 @@ atk_headers = [
   'atkhyperlink.h',
   'atkhyperlinkimpl.h',
   'atkhypertext.h',
+  'atkimage.h',
+  'atkmisc.h',
   'atknoopobject.h',
   'atknoopobjectfactory.h',
   'atkobject.h',
   'atkobjectfactory.h',
   'atkplug.h',
-  'atkimage.h',
   'atkrange.h',
   'atkregistry.h',
   'atkrelation.h',
@@ -63,12 +63,11 @@ atk_headers = [
   'atktablecell.h',
   'atktext.h',
   'atkutil.h',
-  'atkmisc.h',
   'atkvalue.h',
   'atkwindow.h',
 ]
 
-install_headers(atk_headers, subdir: atk_api_path)
+install_headers(atk_headers + ['atk.h'], subdir: atk_api_path)
 
 # Features header
 atk_version_conf = configuration_data()
@@ -81,24 +80,26 @@ atk_version_conf.set('LT_CURRENT_MINUS_AGE', '0')
 atk_version_conf.set('ATK_VERSION', meson.project_version())
 
 atk_version_h = configure_file(input: 'atkversion.h.in',
-               output: 'atkversion.h',
-               configuration: atk_version_conf,
-               install: true,
-               install_dir: join_paths(atk_includedir, atk_api_path))
+  output: 'atkversion.h',
+  configuration: atk_version_conf,
+  install_dir: join_paths(atk_includedir, atk_api_path),
+)
 
 # Marshallers
 atk_marshals = gnome.genmarshal('atkmarshal',
-                                sources: 'atkmarshal.list',
-                                prefix: 'atk_marshal')
+  sources: 'atkmarshal.list',
+  prefix: 'atk_marshal',
+)
 atk_marshal_h = atk_marshals[1]
 
 # Enumerations for GType
 atk_enums = gnome.mkenums('atk-enum-types',
-                          sources: atk_headers,
-                          c_template: 'atk-enum-types.c.template',
-                          h_template: 'atk-enum-types.h.template',
-                          install_dir: join_paths(atk_includedir, atk_api_path),
-                          install_header: true)
+  sources: atk_headers,
+  c_template: 'atk-enum-types.c.template',
+  h_template: 'atk-enum-types.h.template',
+  install_dir: join_paths(atk_includedir, atk_api_path),
+  install_header: true,
+)
 atk_enum_h = atk_enums[1]
 
 atk_cflags = [
@@ -120,36 +121,39 @@ if host_system == 'windows'
   atk_sources += atk_win_res
 endif
 
-atk_inc = include_directories('.')
-
 libatk = library('atk-@0@'.format(atk_api_version),
-                        sources: atk_sources + atk_enums + atk_marshals,
-                        soversion: atk_soversion,
-                        version: atk_libversion,
-                        install: true,
-                        dependencies: glib_dep,
-                        include_directories: [ root_inc, atk_inc ],
-                        c_args: common_cflags + atk_cflags,
-                        link_args: common_ldflags)
+  sources: atk_sources + atk_enums + atk_marshals,
+  soversion: atk_soversion,
+  version: atk_libversion,
+  install: true,
+  dependencies: glib_dep,
+  include_directories: [ root_inc, atk_inc ],
+  c_args: common_cflags + atk_cflags,
+  link_args: common_ldflags,
+)
 
-libatk_dep = declare_dependency(link_with: libatk,
-                                include_directories: [atk_inc, root_inc],
-                                dependencies: glib_dep,
-                                sources: atk_enum_h)
+atk_sources_dep = [ atk_enum_h ]
 
 if get_option('introspection')
-  gnome.generate_gir(libatk,
-                     sources: atk_sources + atk_headers + [ atk_enum_h ] + [ atk_version_h ],
-                     namespace: 'Atk',
-                     nsversion: atk_api_version,
-                     identifier_prefix: 'Atk',
-                     symbol_prefix: 'atk',
-                     export_packages: 'atk',
-                     includes: [ 'GObject-2.0' ],
-                     install: true,
-                     extra_args: [
-                       '--quiet',
-                       '--c-include=atk/atk.h',
-                       '-DATK_COMPILATION',
-                     ])
+  atk_sources_dep += gnome.generate_gir(libatk,
+    sources: atk_sources + atk_headers + [ atk_enum_h ] + [ atk_version_h ],
+    namespace: 'Atk',
+    nsversion: atk_api_version,
+    identifier_prefix: 'Atk',
+    symbol_prefix: 'atk',
+    export_packages: 'atk',
+    includes: [ 'GObject-2.0' ],
+    install: true,
+    extra_args: [
+      '--quiet',
+      '--c-include=atk/atk.h',
+      '-DATK_COMPILATION',
+    ],
+  )
 endif
+
+libatk_dep = declare_dependency(link_with: libatk,
+  include_directories: atk_inc,
+  dependencies: glib_dep,
+  sources: atk_sources_dep,
+)
diff --git a/docs/meson.build b/docs/meson.build
index fb26d40..d6b9c8a 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -5,37 +5,28 @@ private_headers = [
   'atkintl.h',
 ]
 
-content_files = [
-]
-
-html_images = [
-]
-
 glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
 glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
 docpath = join_paths(atk_datadir, 'gtk-doc', 'html')
 
 gnome.gtkdoc('atk',
-             main_xml: 'atk-docs.xml',
-             src_dir: [
-               join_paths(meson.source_root(), 'atk'),
-               join_paths(meson.build_root(), 'atk'),
-             ],
-             dependencies: libatk_dep,
-             gobject_typesfile: 'atk.types',
-             scan_args: [
-               '--rebuild-types',
-               '--deprecated-guards=ATK_DISABLE_DEPRECATED',
-               '--ignore-decorators=_ATK_EXTERN',
-               '--ignore-headers=' + ' '.join(private_headers),
-             ],
-             mkdb_args: [
-               '--output-format=xml',
-             ],
-             fixxref_args: [
-               '--html-dir=@0@'.format(docpath),
-               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
-               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
-             ],
-             html_assets: html_images,
-             install: true)
+  main_xml: 'atk-docs.xml',
+  src_dir: atk_inc,
+  dependencies: libatk_dep,
+  gobject_typesfile: 'atk.types',
+  scan_args: [
+    '--rebuild-types',
+    '--deprecated-guards=ATK_DISABLE_DEPRECATED',
+    '--ignore-decorators=_ATK_EXTERN',
+    '--ignore-headers=' + ' '.join(private_headers),
+  ],
+  mkdb_args: [
+    '--output-format=xml',
+  ],
+  fixxref_args: [
+    '--html-dir=@0@'.format(docpath),
+    '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
+    '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
+  ],
+  install: true,
+)
diff --git a/docs/xml/meson.build b/docs/xml/meson.build
index 91280ef..2a6a1f0 100644
--- a/docs/xml/meson.build
+++ b/docs/xml/meson.build
@@ -1,10 +1,14 @@
 ent_conf = configuration_data()
 ent_conf.set('PACKAGE', meson.project_name())
-ent_conf.set('PACKAGE_BUGREPORT', 'https://bugzilla.gnome.org/enter_bug.cgi?product=atk')
+ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/atk')
 ent_conf.set('PACKAGE_NAME', meson.project_name())
 ent_conf.set('PACKAGE_STRING', meson.project_name())
 ent_conf.set('PACKAGE_TARNAME', '@0@-@1@'.format(meson.project_name(), meson.project_version()))
 ent_conf.set('PACKAGE_URL', 'https://developer.gnome.org/atk/stable')
 ent_conf.set('PACKAGE_VERSION', meson.project_version())
 ent_conf.set('PACKAGE_API_VERSION', atk_api_version)
-configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf)
+configure_file(
+  input: 'gtkdocentities.ent.in',
+  output: 'gtkdocentities.ent',
+  configuration: ent_conf,
+)
diff --git a/meson.build b/meson.build
index 3fec277..3f008ac 100644
--- a/meson.build
+++ b/meson.build
@@ -123,6 +123,7 @@ gnome = import('gnome')
 configure_file(output: 'config.h', configuration: atk_conf)
 
 root_inc = include_directories('.')
+atk_inc = include_directories('atk')
 
 subdir('atk')
 subdir('tests')
diff --git a/tests/meson.build b/tests/meson.build
index 1fbb992..7c1f3ab 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -6,15 +6,20 @@ tests = [
   'testvalue',
 ]
 
-foreach t: tests
-  bin = executable(t, t + '.c',
-                   dependencies: libatk_dep,
-                   include_directories: root_inc,
-                   c_args: common_cflags + [
-                     '-DG_DISABLE_DEPRECATED',
-                   ])
-  test(t, bin, env: [
-    'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
-    'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
-  ])
+foreach test_name: tests
+  test_src = test_name + '.c'
+  test_bin = executable(test_name, test_src,
+    dependencies: libatk_dep,
+    include_directories: root_inc,
+    c_args: common_cflags + [
+      '-DG_DISABLE_DEPRECATED',
+    ],
+  )
+
+  test(test_name, test_bin,
+    env: [
+      'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+      'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+    ],
+  )
 endforeach


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