Makefile.am 1.37 KB
Newer Older
Thomas Leonard's avatar
Thomas Leonard committed
1 2
## Process this file with automake to produce Makefile.in

3 4
SUBDIRS=po

5 6
INCLUDES = $(ALL_CFLAGS)

Thomas Leonard's avatar
Thomas Leonard committed
7 8
AUTOMAKE_OPTIONS = foreign

9
packagesdir = $(mimedir)/packages
10
packages_DATA = freedesktop.org.xml
Thomas Leonard's avatar
Thomas Leonard committed
11

12 13
bin_PROGRAMS = update-mime-database
update_mime_database_SOURCES = update-mime-database.c
14 15
update_mime_database_CFLAGS = $(ALL_CFLAGS)
update_mime_database_LDADD = $(ALL_LIBS)
16

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

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

30 31
CLEANFILES = freedesktop.org.xml
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
32

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

$(pkgconfig_DATA): config.status

38 39 40
@INTLTOOL_XML_RULE@
@INTLTOOL_DESKTOP_RULE@

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

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

check:
	xmllint --noout --valid $(srcdir)/freedesktop.org.xml
56