[Libosinfo] [osinfo-db-tools PATCH v2 15/16] meson: Add ninja syntax-check

Fabiano Fidêncio fidencio at redhat.com
Tue Jul 9 10:47:43 UTC 2019


Let's take advantage of that we can run `make syntax-check` without the
need of having a Makefile around and add a `ninja syntax-check` target
that ends up calling `make syntax-check`.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 build-aux/syntax-check | 5 +++++
 meson.build            | 3 +++
 2 files changed, 8 insertions(+)
 create mode 100755 build-aux/syntax-check

diff --git a/build-aux/syntax-check b/build-aux/syntax-check
new file mode 100755
index 0000000..65d6433
--- /dev/null
+++ b/build-aux/syntax-check
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd $MESON_SOURCE_ROOT/build-aux
+
+make syntax-check
diff --git a/meson.build b/meson.build
index 97ad60c..e1cce62 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,9 @@ foreach spec: specs
     )
 endforeach
 
+# ninja syntax-check target
+run_target('syntax-check', command: 'build-aux/syntax-check')
+
 # ninja dist helper
 meson.add_dist_script('build-aux/dist.sh', meson.source_root(), meson.build_root())
 
-- 
2.21.0




More information about the Libosinfo mailing list