1 # The default database to build and search.
2 AUTOMAKE_OPTIONS = std-options
3 AM_CFLAGS = $(WARN_CFLAGS)
4 LOCATE_DB = $(localstatedir)/locatedb
5 localedir = $(datadir)/locale
7 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = \
12 libexec_PROGRAMS = frcode code bigram
13 bin_SCRIPTS = updatedb
14 man_MANS = locate.1 updatedb.1 locatedb.5
15 BUILT_SOURCES = dblocation.texi
16 EXTRA_DIST = dblocation.texi locatedb.h updatedb.sh $(man_MANS)
19 DISTCLEANFILES = dblocation.texi
20 locate_SOURCES = locate.c word_io.c
21 code_SOURCES = code.c word_io.c
22 locate_TEXINFOS = dblocation.texi
24 AM_CPPFLAGS = -I$(top_srcdir)/lib -I../gl/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
26 LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
28 $(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a
30 # We generate updatedb from the Makefile rather than with AC_OUTPUT in
31 # configure.ac in order to allow the user better control of what goes
32 # into it by setting Makefile variables.
33 updatedb: updatedb.sh Makefile
35 find=`echo find|sed '$(transform)'`; \
36 frcode=`echo frcode|sed '$(transform)'`; \
37 bigram=`echo bigram|sed '$(transform)'`; \
38 code=`echo code|sed '$(transform)'`; \
40 -e "s,@""bindir""@,$(bindir)," \
41 -e "s,@""libexecdir""@,$(libexecdir)," \
42 -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
43 -e "s,@""VERSION""@,$(VERSION)," \
44 -e "s,@""PACKAGE_NAME""@,$(PACKAGE_NAME)," \
45 -e "s,@""find""@,$${find}," \
46 -e "s,@""frcode""@,$${frcode}," \
47 -e "s,@""bigram""@,$${bigram}," \
48 -e "s,@""code""@,$${code}," \
49 -e "s,@""SORT""@,$(SORT)," \
50 -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
51 $(srcdir)/updatedb.sh > $@
55 $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
58 echo '@set LOCATE_DB $(LOCATE_DB)' > $@.tmp
59 if test -f $@ && cmp $@.tmp $@ >/dev/null ; then \
64 .PHONY: dblocation.texi
68 dist-hook: findutils-check-manpages
70 findutils-check-manpages:
71 $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)
73 # Clean coverage files generated by running binaries built with
74 # gcc -fprofile-arcs -ftest-coverage
76 $(RM) *.gcno *.gcda *.gcov *.lcov
78 clean-local: coverage-clean