3 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
4 # 2009 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # bin/ must be run first, as it builds executables needed for tests.
20 # autom4te uses autotest.m4f to generate `testsuite', so build tests last.
21 # Rules in man/ use scripts from both bin/ and tests/, so *it* goes last.
22 SUBDIRS = bin . lib doc tests man
24 ACLOCAL_AMFLAGS = -I m4
26 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
27 BUGS COPYINGv3 COPYING.EXCEPTION \
28 GNUmakefile maint.mk cfg.mk \
29 build-aux/gendocs.sh \
30 build-aux/git-version-gen \
31 build-aux/announce-gen build-aux/gnupload \
32 .prev-version .version
38 AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split
40 if MAKE_CASE_SENSITIVE
41 pkgdata_DATA = $(srcdir)/INSTALL
43 MAINTAINERCLEANFILES = $(srcdir)/INSTALL
44 $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi
45 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -o $@ \
46 $(top_srcdir)/doc/install.texi
50 # Version string management. There are two files to be aware of:
51 # .tarball-version - present only in a distribution tarball, and not in
52 # a checked-out repository. Created with contents that were learned at
53 # the last time autoconf was run, and used by git-version-gen. Must not
54 # be present in either $(srcdir) or $(builddir) for git-version-gen to
55 # give accurate answers during normal development with a checked out tree,
56 # but must be present in a tarball when there is no version control system.
57 # Therefore, it cannot be used in any dependencies. GNUmakefile has
58 # hooks to force a reconfigure at distribution time to get the value
59 # correct, without penalizing normal development with extra reconfigures.
60 # .version - present in a checked-out repository and in a distribution
61 # tarball. At least as current as the most recent .tarball-version
62 # creation. Usable in dependencies, particularly for files that don't
63 # want to depend on config.h but do want to track version changes.
64 BUILT_SOURCES = $(top_srcdir)/.version
65 $(top_srcdir)/.version:
66 echo $(VERSION) > $@-t && mv $@-t $@
68 # Arrange so that .tarball-version appears only in distribution tarballs,
69 # never in a checked-out repository.
71 echo $(VERSION) > $(distdir)/.tarball-version
73 # Arrange to remove the symlink to GNUmakefile in VPATH builds.
74 # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed.
76 if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi
78 # Perl coverage statistics.
79 PERL_COVERAGE_DB = `pwd`/cover_db
80 PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
83 check-coverage-run: all
84 $(mkinstalldirs) $(PERL_COVERAGE_DB)
85 PERL5OPT="$(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
86 $(MAKE) $(AM_MAKEFLAGS) check
88 check-coverage-report:
89 @if test ! -d $(PERL_COVERAGE_DB); then \
90 echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
91 echo "Please run \`make check-coverage' first" >&2; \
94 $(PERL_COVER) $(PERL_COVERAGE_DB) $(PERL_COVER_FLAGS)
96 # We don't use direct dependencies here because we'd like to be able
97 # to invoke the report even after interrupted check-coverage.
98 check-coverage: check-coverage-run
99 $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
101 clean-local: clean-coverage
103 rm -rf $(PERL_COVERAGE_DB)
105 .PHONY: check-coverage check-coverage-run check-coverage-report clean-coverage