[hitori] build: Validate .desktop file at make check time



commit 9624f67794932eefb58e17d6d628bbeaf1ec62af
Author: Philip Withnall <philip tecnocode co uk>
Date:   Tue Feb 14 23:07:40 2017 +0000

    build: Validate .desktop file at make check time
    
    If desktop-file-validate is available; it’s a soft dependency.
    
    Signed-off-by: Philip Withnall <philip tecnocode co uk>

 Makefile.am  |    5 +++++
 configure.ac |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 53e77ad..caff1f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -117,6 +117,11 @@ EXTRA_DIST += \
        $(NULL)
 CLEANFILES += $(desktop_DATA)
 
+check-desktop: $(desktop_DATA)
+       [ "$(DESKTOP_FILE_VALIDATE)" = "" ] || \
+       $(DESKTOP_FILE_VALIDATE) $^
+check-local: check-desktop
+
 # AppData
 @APPSTREAM_XML_RULES@
 
diff --git a/configure.ac b/configure.ac
index 83109d9..6974fb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,9 @@ PKG_CHECK_MODULES([GENERAL],[
 PKG_CHECK_VAR([GTK_PREFIX],[gtk+-3.0],[prefix])
 AC_PATH_PROG([XMLLINT],[xmllint])
 
+# Desktop file validation
+AC_PATH_PROG([DESKTOP_FILE_VALIDATE],[desktop-file-validate])
+
 # Output!
 AC_CONFIG_FILES([
 Makefile


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