[mutter] build: Always pass --quiet to g-ir-scanner



commit f7d4a727a8a6bcbe42ae57719eef7b75bef71e45
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Sat Dec 22 11:28:46 2018 +0100

    build: Always pass --quiet to g-ir-scanner
    
    This makes the build less verbose, as all .gir generation except for
    clutters didn't pass --quiet to g-ir-scanner, making it output long
    linking commands. Do this by adding a common introspection_args
    variable.
    
    While at it, put -U_GNU_SOURCE in there too, as it was always passed
    everywhere as without it the scanner would log warnings.

 clutter/clutter/meson.build | 5 +----
 cogl/cogl-pango/meson.build | 3 +--
 cogl/cogl/meson.build       | 3 +--
 meson.build                 | 5 +++++
 src/meson.build             | 4 +---
 5 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index e383055e7..ed3befbef 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -540,10 +540,7 @@ libmutter_clutter_dep = declare_dependency(
 )
 
 if have_introspection
-  clutter_introspection_args = clutter_c_args + [
-    '-U_GNU_SOURCE', # _GNU_SOURCE triggers warnings in g-ir-scanner
-    '--quiet',
-  ]
+  clutter_introspection_args = introspection_args + clutter_c_args
 
   libmutter_clutter_gir = gnome.generate_gir(libmutter_clutter,
     sources: [
diff --git a/cogl/cogl-pango/meson.build b/cogl/cogl-pango/meson.build
index fcc067a95..90802d07c 100644
--- a/cogl/cogl-pango/meson.build
+++ b/cogl/cogl-pango/meson.build
@@ -54,10 +54,9 @@ if have_introspection
       pango_dep,
       libmutter_cogl_pango_dep,
     ],
-    extra_args: [
+    extra_args: introspection_args + [
       '-UCOGL_COMPILATION',
       '-DG_LOG_DOMAIN=\"CoglPango\"',
-      '-U_GNU_SOURCE',
     ],
     install_dir_gir: pkglibdir,
     install_dir_typelib: pkglibdir,
diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build
index 8b211d9bd..45f2726f9 100644
--- a/cogl/cogl/meson.build
+++ b/cogl/cogl/meson.build
@@ -488,14 +488,13 @@ if have_introspection
     namespace: 'Cogl',
     includes: ['GL-1.0', 'GObject-2.0'],
     dependencies: [cogl_deps],
-    extra_args: [
+    extra_args: introspection_args + [
       '-UCOGL_COMPILATION',
       '-D__COGL_H_INSIDE__',
       '-D__COGL_XLIB_H_INSIDE__',
       '-D__COGL_EGL_H_INSIDE__',
       '-D__COGL_GLX_H_INSIDE__',
       '-DCOGL_GIR_SCANNING',
-      '-U_GNU_SOURCE',
     ],
     install_dir_gir: pkglibdir,
     install_dir_typelib: pkglibdir,
diff --git a/meson.build b/meson.build
index dbc3a5f0f..e24d3645b 100644
--- a/meson.build
+++ b/meson.build
@@ -241,6 +241,11 @@ endif
 have_introspection = get_option('introspection')
 if have_introspection
   gobject_introspection_dep = dependency('gobject-introspection-1.0')
+
+  introspection_args = [
+    '--quiet',
+    '-U_GNU_SOURCE',
+  ]
 endif
 
 have_cogl_tests = get_option('cogl_tests')
diff --git a/src/meson.build b/src/meson.build
index 3e077dd0d..04f1dbe6a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -820,9 +820,7 @@ if have_introspection
       mutter_deps,
       libmutter_dep,
     ],
-    extra_args: mutter_c_args + [
-      '-U_GNU_SOURCE',
-    ],
+    extra_args: mutter_c_args + introspection_args,
     install_dir_gir: pkglibdir,
     install_dir_typelib: pkglibdir,
     install: true


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