about summary refs log tree commit diff
path: root/clients/common/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'clients/common/meson.build')
-rw-r--r--clients/common/meson.build30
1 files changed, 13 insertions, 17 deletions
diff --git a/clients/common/meson.build b/clients/common/meson.build
index 0db2868e..af54cec0 100644
--- a/clients/common/meson.build
+++ b/clients/common/meson.build
@@ -4,7 +4,7 @@ nm_polkit_listener = files('nm-polkit-listener.c')
 
 deps = [
   libnm_dep,
-  nm_core_dep
+  nm_core_dep,
 ]
 
 cflags = clients_cflags + [
@@ -19,12 +19,12 @@ libnmc_base = static_library(
     'nm-vpn-helpers.c',
   ),
   dependencies: deps,
-  c_args: cflags
+  c_args: cflags,
 )
 
 libnmc_base_dep = declare_dependency(
   include_directories: common_inc,
-  link_with: libnmc_base
+  link_with: libnmc_base,
 )
 
 settings_docs = 'settings-docs.h'
@@ -34,23 +34,19 @@ if enable_introspection
     settings_docs,
     input: nm_property_docs,
     output: settings_docs,
-    command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@']
+    command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
   )
 
-  # FIXME: if enabled the check happens even if the settings_docs_source is not set
-  '''
-  if get_option('check_settings_docs')
-    res = run_command(find_program('cmp'), '-s', settings_docs + '.in', settings_docs_source.full_path())
-    if res.returncode() != 0
-      message('The generated file ' + settings_docs_source.full_path() + ' differs from the source file ' + settings_docs + '.in' + '. You probably should copy the generated file over to the source file. You can skip this test by setting -Dcheck_settings_docs=false')
-    endif
-  endif
-  '''
+  test(
+    'check-settings-docs',
+    find_program(join_paths(meson.source_root(), 'tools', 'check-settings-docs.sh')),
+    args: [meson.source_root(), meson.build_root(), 'clients/common/' + settings_docs]
+  )
 else
   settings_docs_source = configure_file(
     input: settings_docs + '.in',
     output: settings_docs,
-    configuration: configuration_data()
+    configuration: configuration_data(),
   )
 endif
 
@@ -58,17 +54,17 @@ libnmc = static_library(
   'nmc',
   sources: files(
     'nm-meta-setting-access.c',
-    'nm-meta-setting-desc.c'
+    'nm-meta-setting-desc.c',
   ) + shared_nm_meta_setting_c + shared_nm_ethtool_utils_c + [settings_docs_source],
   dependencies: deps,
   c_args: cflags,
   link_with: libnmc_base,
-  link_depends: settings_docs_source
+  link_depends: settings_docs_source,
 )
 
 libnmc_dep = declare_dependency(
   include_directories: common_inc,
-  link_with: libnmc
+  link_with: libnmc,
 )
 
 if (enable_introspection or enable_nmtui) and enable_tests