[gnome-photos] Validate desktop files at check-local



commit c3105da2b1903c856206ced9065ee080c61160a2
Author: Yanko Kaneti <yaneti declera com>
Date:   Tue Sep 17 18:18:54 2013 +0200

    Validate desktop files at check-local
    
    This should catch breakages caused by translations.

 configure.ac     |    6 ++++++
 data/Makefile.am |    9 +++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a01efea..2af074d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,12 @@ LIBGD_INIT([
 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
 AC_SUBST(GLIB_COMPILE_RESOURCES)
 
+AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [the desktop-file-validate program])
+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
+
 AC_CONFIG_FILES([
 Makefile
 data/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 0eedfea..10d3767 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -36,4 +36,13 @@ DISTCLEANFILES = \
        $(desktop_in_files) \
        $(NULL)
 
+desktop-file-validate: $(desktop_DATA)
+       for f in $^; do \
+               $(DESKTOP_FILE_VALIDATE) $$f; \
+       done
+
+check-local: desktop-file-validate
+
+.PHONY: desktop-file-validate
+
 -include $(top_srcdir)/git.mk


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