Imported Upstream version 2.8.4
[platform/upstream/man-db.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ##
3 ## Copyright (C) 1994, 1995 Graeme Wilford.
4 ## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, 2011, 2012
5 ##               Colin Watson.
6 ##
7 ## This file is part of man-db.
8 ##
9 ## man-db is free software; you can redistribute it and/or modify it
10 ## under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation; either version 2 of the License, or
12 ## (at your option) any later version.
13 ##
14 ## man-db is distributed in the hope that it will be useful, but
15 ## WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ## GNU General Public License for more details.
18 ##
19 ## You should have received a copy of the GNU General Public License
20 ## along with man-db; if not, write to the Free Software Foundation,
21 ## Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
23 if HAVE_GNULIB_PO
24 GNULIB_PO = gl/po
25 endif
26
27 SUBDIRS = docs gl/lib $(GNULIB_PO) init lib libdb src man manual po tools
28
29 dist_noinst_DATA = FAQ NEWS README include/README
30
31 EXTRA_DIST = \
32         .gitignore \
33         ChangeLog-2013 \
34         bootstrap \
35         bootstrap.conf \
36         patches/argp-domain.patch \
37         patches/fdutimens-hurd.patch \
38         release.sh
39
40 # These macro files are imported by gnulib-tool, but at present not used. We
41 # include them in the distribution anyway for maximum consistency.
42 EXTRA_DIST += \
43         gl/m4/glibc2.m4 \
44         gl/m4/intdiv0.m4 \
45         gl/m4/intl.m4 \
46         gl/m4/intldir.m4 \
47         gl/m4/intmax.m4 \
48         gl/m4/inttypes-pri.m4 \
49         gl/m4/lcmessage.m4 \
50         gl/m4/math_h.m4 \
51         gl/m4/printf-posix.m4 \
52         gl/m4/sockpfaf.m4 \
53         gl/m4/uintmax_t.m4 \
54         gl/m4/visibility.m4
55
56 # Installing in --enable-setuid mode (the default) requires root; disable
57 # this so that distcheck can be run as non-root.
58 # The default for systemdtmpfilesdir is intentionally not prefix-sensitive,
59 # but we need to adjust it in order for distcheck to pass.
60 AM_DISTCHECK_CONFIGURE_FLAGS = \
61         --disable-setuid \
62         --with-systemdtmpfilesdir=\$${prefix}/lib/tmpfiles.d
63
64 # We deliberately leave the configuration file in place on uninstall, since
65 # it may contain local customisations.
66 distuninstallcheck_listfiles = \
67         find . -type f -print | grep -v 'etc/man_db\.conf'
68
69 # Note that autopoint installs into the first directory here. Yes, this
70 # means that it installs into gl/m4, so we always run gnulib-tool after
71 # autopoint, at least for now. See
72 # https://lists.gnu.org/archive/html/bug-gnulib/2009-03/msg00154.html and
73 # thread.
74 ACLOCAL_AMFLAGS = -I gl/m4 -I m4
75
76 dist-hook: gen-ChangeLog
77
78 gen_start_date = '2013-12-09 00:52'
79 .PHONY: gen-ChangeLog
80 gen-ChangeLog:
81         $(AM_V_GEN)if test -d .git; then \
82                 $(top_srcdir)/build-aux/gitlog-to-changelog \
83                         --format='%s%n%n%b%n' \
84                         --since="$(gen_start_date)" > $(distdir)/cl-t; \
85                 rm -f $(distdir)/ChangeLog; \
86                 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
87         fi