Bugfixes for Savannah bugs #19768 and #19766
[findutils.git] / locate / Makefile.am
blob5a5db770fc0ecea851d609c18de9e7e09787e5e5
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
15 INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
17 LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@
19 $(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a
21 updatedb: updatedb.sh
22         rm -f $@
23         find=`echo find|sed '$(transform)'`; \
24         frcode=`echo frcode|sed '$(transform)'`; \
25         bigram=`echo bigram|sed '$(transform)'`; \
26         code=`echo code|sed '$(transform)'`; \
27         sed \
28         -e "s,@""bindir""@,$(bindir)," \
29         -e "s,@""libexecdir""@,$(libexecdir)," \
30         -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
31         -e "s,@""VERSION""@,@VERSION@," \
32         -e "s,@""find""@,$${find}," \
33         -e "s,@""frcode""@,$${frcode}," \
34         -e "s,@""bigram""@,$${bigram}," \
35         -e "s,@""code""@,$${code}," \
36         -e "s,@""SORT""@,$(SORT)," \
37         -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
38         $(srcdir)/updatedb.sh > $@
39         chmod +x $@
41 install-data-hook:
42         $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
44 dblocation.texi: Makefile
45         echo '@set LOCATE_DB $(LOCATE_DB)' > $@
47 SUBDIRS = testsuite