cvsimport
[findutils.git] / locate / Makefile.am
blob7466ed3660de126f9dfb8a3baeec49ccf4a75011
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
15 code_SOURCES = code.c word_io.c
17 INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
19 LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@
21 $(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a
23 updatedb: updatedb.sh
24         rm -f $@
25         find=`echo find|sed '$(transform)'`; \
26         frcode=`echo frcode|sed '$(transform)'`; \
27         bigram=`echo bigram|sed '$(transform)'`; \
28         code=`echo code|sed '$(transform)'`; \
29         sed \
30         -e "s,@""bindir""@,$(bindir)," \
31         -e "s,@""libexecdir""@,$(libexecdir)," \
32         -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \
33         -e "s,@""VERSION""@,@VERSION@," \
34         -e "s,@""find""@,$${find}," \
35         -e "s,@""frcode""@,$${frcode}," \
36         -e "s,@""bigram""@,$${bigram}," \
37         -e "s,@""code""@,$${code}," \
38         -e "s,@""SORT""@,$(SORT)," \
39         -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \
40         $(srcdir)/updatedb.sh > $@
41         chmod +x $@
43 install-data-hook:
44         $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
46 dblocation.texi: Makefile
47         echo '@set LOCATE_DB $(LOCATE_DB)' > $@
49 SUBDIRS = testsuite
51 dist-hook: findutils-check-manpages
53 findutils-check-manpages:
54         $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)