[gnome-shell-extensions/wip/fmuellner/meson: 5/6] build: Optionally syntax-check sources
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/fmuellner/meson: 5/6] build: Optionally syntax-check sources
- Date: Thu, 30 Nov 2017 23:30:03 +0000 (UTC)
commit 62948758ac2344e65b925bf16c91263fba7b01b8
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Nov 29 22:00:14 2017 +0100
build: Optionally syntax-check sources
extensions/meson.build | 25 +++++++++++++++++++++----
meson.build | 1 +
2 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/extensions/meson.build b/extensions/meson.build
index 79208e6..8ee0640 100644
--- a/extensions/meson.build
+++ b/extensions/meson.build
@@ -1,6 +1,7 @@
extension_schemas = []
+js_sources = extensionlib
-foreach e : enabled_extensions
+foreach e : all_extensions
uuid = e + '@gnome-shell-extensions.gcampax.github.com'
metadata_conf = configuration_data()
@@ -16,11 +17,27 @@ foreach e : enabled_extensions
subdir(e)
- install_data (extension_sources + extension_data + extensionlib,
- install_dir: join_paths(extensiondir, uuid)
- )
+ js_sources += extension_sources
+
+ if (enabled_extensions.contains(e))
+ install_data (extension_sources + extension_data + extensionlib,
+ install_dir: join_paths(extensiondir, uuid)
+ )
+ endif
endforeach
install_data (extension_schemas,
install_dir: schemadir
)
+
+foreach js_source : js_sources
+ if (js52.found())
+ path_array = '@0@'.format(js_source).split('/')
+ name = join_paths(path_array[-2], path_array[-1])
+
+ test('Checking syntax of ' + name, js52,
+ args: ['-s', '-c', js_source],
+ workdir: meson.current_source_dir()
+ )
+ endif
+endforeach
diff --git a/meson.build b/meson.build
index c4abe75..6d57334 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,7 @@ xsessiondir = join_paths(datadir, 'xsession')
extensionlib = files('lib/convenience.js')
+js52 = find_program('js52', required: false)
sassc = find_program('sassc', required: false)
ver_arr = meson.project_version().split('.')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]