Imported Upstream version 4.5.10
[platform/upstream/findutils.git] / Makefile.am
1 AUTOMAKE_OPTIONS=gnits
2 # readme-alpha
3 AM_CFLAGS = $(WARN_CFLAGS)
4
5 EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \
6                 THANKS import-gnulib.sh import-gnulib.config \
7                 tool-versions.txt README-hacking
8 DISTCLEANFILES = tool-versions.txt
9
10
11 # "tests" is the gnulib unit test dir.
12 SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4
13
14 ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
15
16 TESTFILE_SUFFIXES = .exp .xo .xe .xi
17
18 # CONFIG_CLEAN_FILES = gnulib/lib/regex.c
19
20 tool-versions.txt: Makefile
21         ( automake --version ; echo ; \
22         autoconf --version ; echo ; \
23         $(CC) --version ; echo ; \
24         m4 --version ; echo ; \
25         gettext --version ; echo ; \
26         runtest --version ; echo ; \
27         makeinfo --version ) > $@
28
29
30 dist-hook: findutils-check-pofiles findutils-check-testfiles
31
32
33 ## Check that we actually shipped all the .po files.  If this rule fails,
34 ## check ALL_LINGUAS in configure.in against the po files in the source
35 ## directory (their names, not their contents)
36 findutils-check-pofiles:
37         @echo ; echo Checking to see if we distributed the full set of .po files
38         distcount=`ls $(distdir)/po/*.po | wc -l` ; srccount=`ls $(srcdir)/po/*.po | wc -l` ; test $$distcount -eq $$srccount || ( echo FAILED: Please check the value of ALL_LINGUAS in configure.in against the actual set of ".po" files >&2 ; false )
39         @echo All .po files distributed OK.
40
41 ## Check that we actually shipped all the test files that exist in the source.
42 ## runtest will run all the .exp files it finds, and so if we don't ship all
43 ## of them, there will be some tests which people using the CVS code will be
44 ## running, but people using the source distribution will not.
45 findutils-check-testfiles:
46         @echo
47         $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
48
49
50 findutils-check-smells:
51         find  $(srcdir) \( -path $(srcdir)/autom4te.cache -o  \
52                            -path $(srcdir)/gnulib-git     -o  \
53                            -name .git             -o  \
54                            \( -type d -name CVS \)  \
55                        \) -prune -o                  \
56         \( -type f -o -type l \)  \
57         \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \
58         -print0 | \
59         xargs -0 python $(AUXDIR)/src-sniff.py