build: Distribute test-dependent makefiles.
[platform/upstream/folks.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 SUBDIRS = \
4         folks \
5         backends \
6         tests \
7         tools \
8         po \
9         $(NULL)
10
11 if HAVE_VALADOC
12 SUBDIRS += docs
13 endif
14
15 DISTCHECK_CONFIGURE_FLAGS = \
16         --enable-docs \
17         --disable-vala \
18         $(NULL)
19
20 EXTRA_DIST = \
21         autogen.sh \
22         check.mk \
23         valgrind.mk \
24         $(NULL)
25
26 MAINTAINERCLEANFILES = \
27         ABOUT-NLS \
28         $(srcdir)/INSTALL \
29         $(srcdir)/aclocal.m4 \
30         $(srcdir)/compile \
31         $(srcdir)/config.guess \
32         $(srcdir)/config.h.in \
33         $(srcdir)/config.rpath \
34         $(srcdir)/config.sub \
35         $(srcdir)/depcomp \
36         $(srcdir)/install-sh \
37         $(srcdir)/ltmain.sh \
38         $(srcdir)/missing \
39         $(srcdir)/mkinstalldirs \
40         $(srcdir)/ChangeLog \
41         `find "$(srcdir)" -type f -name Makefile.in -print` \
42         `find "m4" -type f -name "*.m4" ! -name "as-compiler-flag.m4" ! -name "introspection.m4" ! -name "vala.m4" -print` \
43         po/Makevars.template \
44         po/Rules-quot \
45         po/boldquot.sed \
46         po/en@boldquot.header \
47         po/en@quot.header \
48         po/insert-header.sin \
49         po/missing \
50         po/quot.sed \
51         po/remove-potcdate.sin \
52         $(NULL)
53
54 distclean-local:
55         if test "x$(srcdir)" = "x."; then :; else \
56                 rm -f ChangeLog; \
57         fi
58
59 distcleancheck_listfiles = \
60         find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
61                 sh '{}' ';'
62
63 maintainer-upload-release:
64         $(MAKE) -C docs maintainer-upload-release
65
66 ChangeLog:
67         @echo Creating $@
68         @if test -d "$(srcdir)/.git"; then \
69           (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
70           && mv -f $@.tmp $@ \
71           || ($(RM) $@.tmp; \
72               echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
73               (test -f $@ || echo git-log is required to generate this file >> $@)); \
74         else \
75           test -f $@ || \
76           (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
77           echo A git checkout and git-log is required to generate this file >> $@); \
78         fi
79
80 .PHONY: ChangeLog
81
82 -include $(top_srcdir)/git.mk