Imported Upstream version 4.5.14
[platform/upstream/findutils.git] / find / Makefile.am
1 AUTOMAKE_OPTIONS = std-options
2 AM_CFLAGS = $(WARN_CFLAGS)
3 localedir = $(datadir)/locale
4 # noinst_PROGRAMS = regexprops
5 # regexprops_SOURCES = regexprops.c
6
7 noinst_LIBRARIES = libfindtools.a
8 libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c
9
10 # We always build two versions of find, one with fts, one without.
11 # Their names depend on whether the user specified --with-fts.
12 #
13 # --with-fts            find            extra binary
14 #       yes             with fts        'oldfind', without fts
15 #        no             without fts     'ftsfind', with fts
16 #
17 if WITH_FTS
18 bin_PROGRAMS     = find oldfind
19 find_SOURCES     = ftsfind.c
20 oldfind_SOURCES  = find.c
21 man_MANS         = find.1 oldfind.1
22 else
23 bin_PROGRAMS      = find ftsfind
24 find_SOURCES      = find.c
25 ftsfind_SOURCES   = ftsfind.c
26 man_MANS          = find.1 ftsfind.1
27 endif
28
29 # We don't just include man_MANS in EXTRA_DIST because while the value of
30 # man_MANS is not always the same, we want to distribute all of those files.
31 EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1
32 AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
33 LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS)
34 # gnulib advises we link against <first> because we use <second>:
35 # $(GETHOSTNAME_LIB)            uname
36 # $(LIB_CLOCK_GETTIME)          (some inditrect dependency)
37 # $(LIB_EACCESS)                faccessat
38 # $(LIB_SELINUX)                selinux-h
39 # $(MODF_LIBM)                  modf
40
41 SUBDIRS = . testsuite
42
43 #$(PROGRAMS): ../lib/libfind.a
44
45 dist-hook: findutils-check-manpages
46
47 # Clean coverage files generated by running binaries built with
48 # gcc -fprofile-arcs -ftest-coverage
49 coverage-clean:
50         $(RM) *.gcno *.gcda *.gcov *.lcov
51
52 clean-local: coverage-clean
53
54 findutils-check-manpages:
55         $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS)