Makefile.am 1.54 KB
Newer Older
1 2
SUBDIRS=po

3 4
INCLUDES = $(ALL_CFLAGS)

5
packagesdir = $(datadir)/mime/packages
6
packages_DATA = freedesktop.org.xml
Thomas Leonard's avatar
Thomas Leonard committed
7

8 9
bin_PROGRAMS = update-mime-database
update_mime_database_SOURCES = update-mime-database.c
10 11
update_mime_database_CFLAGS = $(ALL_CFLAGS)
update_mime_database_LDADD = $(ALL_LIBS)
12

13 14 15 16 17
noinst_PROGRAMS = test-subclassing
test_subclassing_SOURCES = test-subclassing.c
test_subclassing_CFLAGS = $(ALL_CFLAGS)
test_subclassing_LDADD = $(ALL_LIBS)

Thomas Leonard's avatar
Thomas Leonard committed
18 19
man_MANS = update-mime-database.1

20 21 22 23 24 25 26 27
EXTRA_DIST = \
	shared-mime-info-spec.xml	\
	freedesktop.org.xml.in		\
	$(packages_DATA) 		\
	README				\
	$(man_MANS)			\
	intltool-extract.in		\
	intltool-merge.in		\
28 29
	intltool-update.in		\
	shared-mime-info.pc.in
30

31
CLEANFILES = freedesktop.org.xml po/stamp-it
32
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
33

34
pkgconfigdir = $(libdir)/pkgconfig
35 36 37 38
pkgconfig_DATA = shared-mime-info.pc

$(pkgconfig_DATA): config.status

39 40 41
@INTLTOOL_XML_RULE@
@INTLTOOL_DESKTOP_RULE@

42
install-data-hook: 
43
if ENABLE_UPDATE_MIMEDB
44
	$(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
45
endif
Thomas Leonard's avatar
Thomas Leonard committed
46 47

uninstall-hook:
48 49 50 51 52 53
	for media in text application image audio inode video message model multipart; do rm -f "$(DESTDIR)$(datadir)/mime/$${media}/"*.xml; done
	rm -f "$(DESTDIR)$(datadir)/mime/globs"
	rm -f "$(DESTDIR)$(datadir)/mime/magic"
	rm -f "$(DESTDIR)$(datadir)/mime/aliases"
	rm -f "$(DESTDIR)$(datadir)/mime/subclasses"
	rm -f "$(DESTDIR)$(datadir)/mime/XMLnamespaces"
54

55 56
all: check

57
check:
58 59 60
	if [ -d CVS/ ]; then						\
		xmllint --noout --valid $(srcdir)/freedesktop.org.xml;	\
	fi
61