[aisleriot/gnome-3-8] build: Validate desktop file on 'make check'



commit a8b8b43b68f8926219a20c3f335fb632a41a9885
Author: Christian Persch <chpe gnome org>
Date:   Mon Mar 25 22:42:14 2013 +0100

    build: Validate desktop file on 'make check'

 configure.ac     |    6 ++++++
 data/Makefile.am |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2e5dc90..4567fa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,6 +378,12 @@ if test -z "$XMLLINT"; then
   AC_MSG_ERROR([xmllint not found])
 fi
 
+AC_ARG_VAR([DESKTOP_FILE_VALIDATE],[the desktop-file-validate programme])
+AC_PATH_PROG([DESKTOP_FILE_VALIDATE],[desktop-file-validate],[])
+if test -z "$DESKTOP_FILE_VALIDATE"; then
+  AC_MSG_ERROR([desktop-file-validate not found])
+fi
+
 if test "$platform_win32" = "yes" -a "$os_win32" = "yes"; then
   AC_CHECK_TOOL([WINDRES],[windres],[no])
   if test "$WINDRES" = "no"; then
diff --git a/data/Makefile.am b/data/Makefile.am
index 403ed9d..f22ec14 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -22,6 +22,14 @@ desktop_in_files = \
 desktopdir = $(datadir)/applications
 desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
 
+desktop-file-validate: $(desktop_DATA)
+       for f in $^; do \
+               $(DESKTOP_FILE_VALIDATE) $$f; \
+       done
+
+check-local: desktop-file-validate
+
+
 dist_valgrind_DATA = \
        aisleriot.supp \
        $(NULL)


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