locate also needs source file word_io.c.
[findutils.git] / locate / Makefile.am
blob11123710767c1907f6c883b29cd4665cc89a81ce
1 # The default database to build and search.
2 AUTOMAKE_OPTIONS = std-options
3 LOCATE_DB = $(localstatedir)/locatedb
4 localedir = $(datadir)/locale
6 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = frcode code bigram
7 bin_PROGRAMS = locate 
8 libexec_PROGRAMS = frcode code bigram
9 bin_SCRIPTS = updatedb
10 man_MANS = locate.1 updatedb.1 locatedb.5
11 BUILT_SOURCES = dblocation.texi
12 EXTRA_DIST = locatedb.h updatedb.sh $(man_MANS)
13 CLEANFILES = updatedb dblocation.texi
14 locate_SOURCES = locate.c word_io.c
16 INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
18 LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@
20 $(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a
22 updatedb: updatedb.sh
23         rm -f $@
24         find=`echo find|sed '$(transform)'`; \
25         frcode=`echo frcode|sed '$(transform)'`; \
26         bigram=`echo bigram|sed '$(transform)'`; \
27         code=`echo code|sed '$(transform)'`; \
28         sed \
29         -e "s,@""bindir""@,$(bindir)," \
30         -e "s,@""libexecdir""@,$(libexecdir)," \
31         -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
32         -e "s,@""VERSION""@,@VERSION@," \
33         -e "s,@""find""@,$${find}," \
34         -e "s,@""frcode""@,$${frcode}," \
35         -e "s,@""bigram""@,$${bigram}," \
36         -e "s,@""code""@,$${code}," \
37         -e "s,@""SORT""@,$(SORT)," \
38         -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
39         $(srcdir)/updatedb.sh > $@
40         chmod +x $@
42 install-data-hook:
43         $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
45 dblocation.texi: Makefile
46         echo '@set LOCATE_DB $(LOCATE_DB)' > $@
48 SUBDIRS = testsuite
50 dist-hook: findutils-check-manpages
52 findutils-check-manpages:
53         $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)