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 = locatedb.h updatedb.sh $(man_MANS)
17 CLEANFILES = updatedb dblocation.texi
18 locate_SOURCES = locate.c word_io.c
19 code_SOURCES = code.c word_io.c
21 INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
23 LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
25 $(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a
27 # We generate updatedb from the Makefile rather than with AC_OUTPUT in
28 # configure.ac in order to allow the user better control of what goes
29 # into it by setting Makefile variables.
30 updatedb: updatedb.sh Makefile
32 find=`echo find|sed '$(transform)'`; \
33 frcode=`echo frcode|sed '$(transform)'`; \
34 bigram=`echo bigram|sed '$(transform)'`; \
35 code=`echo code|sed '$(transform)'`; \
37 -e "s,@""bindir""@,$(bindir)," \
38 -e "s,@""libexecdir""@,$(libexecdir)," \
39 -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
40 -e "s,@""VERSION""@,@VERSION@," \
41 -e "s,@""PACKAGE_NAME""@,@PACKAGE_NAME@," \
42 -e "s,@""find""@,$${find}," \
43 -e "s,@""frcode""@,$${frcode}," \
44 -e "s,@""bigram""@,$${bigram}," \
45 -e "s,@""code""@,$${code}," \
46 -e "s,@""SORT""@,$(SORT)," \
47 -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
48 $(srcdir)/updatedb.sh > $@
52 $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
54 dblocation.texi: Makefile
55 echo '@set LOCATE_DB $(LOCATE_DB)' > $@
59 dist-hook: findutils-check-manpages
61 findutils-check-manpages:
62 $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)