[gnome-terminal] build: Validate desktop file on make check
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] build: Validate desktop file on make check
- Date: Mon, 24 Feb 2014 22:35:02 +0000 (UTC)
commit c49f1fa47688ee4275965efba33318d499886211
Author: Christian Persch <chpe gnome org>
Date: Mon Feb 24 23:29:36 2014 +0100
build: Validate desktop file on make check
Makefile.am | 10 +++++++++-
configure.ac | 6 ++++++
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d09067b..b145b0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,14 +15,22 @@ DISTCHECK_CONFIGURE_FLAGS = \
desktopdir = $(datadir)/applications
desktop_in_files = @PACKAGE desktop in in
-desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
+nodist_desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
+DESKTOP_FILE_VALIDATE_FLAGS =
+desktop-file-validate: $(nodist_desktop_DATA)
+ for f in $^; do \
+ $(DESKTOP_FILE_VALIDATE) $(DESKTOP_FILE_VALIDATE_FLAGS) $$f; \
+ done
+
appdatadir = $(datadir)/appdata
appdata_in_files = gnome-terminal.appdata.xml.in
nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
+check-local: desktop-file-validate
+
EXTRA_DIST = \
$(appdata_in_files) \
ChangeLog.pre-2-23 \
diff --git a/configure.ac b/configure.ac
index a2a9dfb..386c814 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,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
+
# ***************************
# GNOME Shell search provider
# ***************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]