[hitori] build: Add validation checks for the UI files
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hitori] build: Add validation checks for the UI files
- Date: Fri, 23 Dec 2016 23:44:53 +0000 (UTC)
commit a2673166bde308c06fd4c636987e4dc8f0b07681
Author: Philip Withnall <philip tecnocode co uk>
Date: Fri Dec 23 23:42:49 2016 +0000
build: Add validation checks for the UI files
Makefile.am | 10 +++++++---
configure.ac | 4 ++++
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f82554d..54f47f5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -84,13 +84,17 @@ CLEANFILES = src/hitori-resources.c
EXTRA_DIST += src/hitori.gresource.xml
# UI & CSS files
-dist_noinst_DATA = \
+ui_data = \
data/hitori-menus.ui \
data/hitori.ui \
+ $(NULL)
+dist_noinst_DATA = \
+ $(ui_data) \
data/hitori.css
-check-builder: $(ui_DATA)
- xmllint --nonet --noblanks --noout --relaxng /opt/gnome3/source/gtk+/gtk/gtkbuilder.rng $^
+check-builder: $(ui_data)
+ [ "$(XMLLINT)" == "" ] || \
+ $(XMLLINT) --nonet --noblanks --noout --relaxng $(GTK_PREFIX)/share/gtk-3.0/gtkbuilder.rng $^
check-local: check-builder
# GSettings
diff --git a/configure.ac b/configure.ac
index f7fbb9d..ae000fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,10 @@ PKG_CHECK_MODULES([GENERAL],[
gmodule-2.0 cairo >= 1.4
])
+# GTK+ prefix for gtkbuilder.rng
+PKG_CHECK_VAR([GTK_PREFIX],[gtk+-3.0],[prefix])
+AC_PATH_PROG([XMLLINT],[xmllint])
+
# Output!
AC_CONFIG_FILES([
Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]