Makefile.am 1.58 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

17 18 19 20 21
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
22 23
man_MANS = update-mime-database.1

24 25 26 27 28 29 30 31
EXTRA_DIST = \
	shared-mime-info-spec.xml	\
	freedesktop.org.xml.in		\
	$(packages_DATA) 		\
	README				\
	$(man_MANS)			\
	intltool-extract.in		\
	intltool-merge.in		\
32 33
	intltool-update.in		\
	shared-mime-info.pc.in
34

35
CLEANFILES = freedesktop.org.xml po/stamp-it
36
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
37

38 39 40 41 42
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = shared-mime-info.pc

$(pkgconfig_DATA): config.status

43 44 45
@INTLTOOL_XML_RULE@
@INTLTOOL_DESKTOP_RULE@

46
install-data-hook: 
47
if ENABLE_UPDATE_MIMEDB
48
	$(DESTDIR)"$(bindir)/update-mime-database" "$(DESTDIR)${mimedir}"
49
endif
Thomas Leonard's avatar
Thomas Leonard committed
50 51

uninstall-hook:
52 53 54
	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"
55 56
	rm -f "$(DESTDIR)${mimedir}/aliases"
	rm -f "$(DESTDIR)${mimedir}/subclasses"
57
	rm -f "$(DESTDIR)${mimedir}/XMLnamespaces"
58

59 60
all: check

61
check:
62 63 64
	if [ -d CVS/ ]; then						\
		xmllint --noout --valid $(srcdir)/freedesktop.org.xml;	\
	fi
65