3 INCLUDES = $(ALL_CFLAGS)
5 packagesdir = $(datadir)/mime/packages
6 packages_DATA = freedesktop.org.xml
8 bin_PROGRAMS = update-mime-database
9 update_mime_database_SOURCES = update-mime-database.c
10 update_mime_database_CFLAGS = $(ALL_CFLAGS)
11 update_mime_database_LDADD = $(ALL_LIBS)
13 noinst_PROGRAMS = test-subclassing
14 test_subclassing_SOURCES = test-subclassing.c
15 test_subclassing_CFLAGS = $(ALL_CFLAGS)
16 test_subclassing_LDADD = $(ALL_LIBS)
19 noinst_PROGRAMS += test-tree-magic
20 test_tree_magic_SOURCES = test-tree-magic.c
21 test_tree_magic_CFLAGS = $(GIO_CFLAGS)
22 test_tree_magic_LDADD = $(GIO_LIBS)
25 man_MANS = update-mime-database.1
28 shared-mime-info-spec.xml \
29 freedesktop.org.xml.in \
35 shared-mime-info.pc.in \
36 po/shared-mime-info.pot
38 CLEANFILES = freedesktop.org.xml po/stamp-it
39 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
41 pkgconfigdir = $(datadir)/pkgconfig
42 pkgconfig_DATA = shared-mime-info.pc
44 $(pkgconfig_DATA): config.status
47 @INTLTOOL_DESKTOP_RULE@
49 install-data-hook: install-binPROGRAMS
50 if ENABLE_UPDATE_MIMEDB
51 $(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
55 for media in text application image audio inode video message model multipart x-epoc x-content; do rm -f "$(DESTDIR)$(datadir)/mime/$${media}/"*.xml; done
56 rm -f "$(DESTDIR)$(datadir)/mime/globs"
57 rm -f "$(DESTDIR)$(datadir)/mime/magic"
58 rm -f "$(DESTDIR)$(datadir)/mime/aliases"
59 rm -f "$(DESTDIR)$(datadir)/mime/subclasses"
60 rm -f "$(DESTDIR)$(datadir)/mime/XMLnamespaces"
61 rm -f "$(DESTDIR)$(datadir)/mime/mime.cache"
62 rm -f "$(DESTDIR)$(datadir)/mime/XMLnamespaces"
63 rm -f "$(DESTDIR)$(datadir)/mime/mime.cache"
64 rm -f "$(DESTDIR)$(datadir)/mime/icons"
65 rm -f "$(DESTDIR)$(datadir)/mime/generic-icons"
66 rm -f "$(DESTDIR)$(datadir)/mime/globs2"
67 rm -f "$(DESTDIR)$(datadir)/mime/treemagic"
68 rm -f "$(DESTDIR)$(datadir)/mime/types"
69 rm -f "$(DESTDIR)$(datadir)/mime/version"
74 $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
76 check: create-pot freedesktop.org.xml update-mime-database check-translations
77 if test -e $(top_builddir)/freedesktop.org.xml; then \
78 xmllint --noout --valid $(top_builddir)/freedesktop.org.xml || exit 1; \
80 xmllint --noout --valid $(top_srcdir)/freedesktop.org.xml || exit 1; \
82 if test -d .git/ && test -x $(top_builddir)/update-mime-database && test -d $(top_srcdir)/mime-db-tests ; then \
83 $(top_builddir)/update-mime-database mime-db-tests/ ; \
85 if test -d .git/ && test -x ../xdgmime/src/test-mime-data && test -x $(top_builddir)/test-tree-magic ; then \
86 mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \
87 cp -a $(top_builddir)/freedesktop.org.xml $(top_builddir)/temp-mime-dir/mime/packages/ ; \
88 XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/update-mime-database "$(top_builddir)/temp-mime-dir/mime/" ; \
89 XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" XDG_DATA_HOME="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data -v tests/list || (XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data -v -v tests/list ; exit 1); \
90 XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/test-tree-magic tests/tree-list || exit 1; \
91 rm -rf "$(top_builddir)/temp-mime-dir/" ; \
93 @if `grep comment $(srcdir)/freedesktop.org.xml.in | grep -v _comment | grep -q -v '<!'` ; then \
94 echo "***************************************************************************" ; \
95 echo "*** Some comments are not marked as translatable, fix before committing ***" ; \
96 echo "***************************************************************************" ; \
99 @echo Number of mime-types that might need generic-icon: `grep "mime-type type=" $(srcdir)/freedesktop.org.xml.in | grep -v video/ | grep -v image/ | grep -v text/ | grep -v audio/ | grep -v "octet-stream" | wc -l` ; \
100 echo Number of mime-types with a generic icon: `grep "generic-icon name=" $(srcdir)/freedesktop.org.xml.in | wc -l` ;
103 @for i in $(top_srcdir)/po/*.po ; do \
104 if ! grep -q `basename $$i | sed 's,.po,,'` $(top_srcdir)/po/LINGUAS ; then \
105 echo '***' `basename $$i | sed 's,.po,,'` missing from po/LINGUAS '***' ; \
110 update-translations: create-pot
111 @tx pull --all --force --skip
114 # Build ChangeLog from GIT history
116 @if test -f $(top_srcdir)/.git/HEAD; then \
117 git log --stat --after="Tue Oct 6 14:46:33 2009 +0000" > $@; \