cvsimport
[findutils.git] / Makefile.am
Commit [+]AuthorDateLineData
09ef63fd jay2007-11-25 11:36:10 +00001AUTOMAKE_OPTIONS=gnits
2# readme-alpha
3
4EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \
5 THANKS import-gnulib.sh import-gnulib.config
6# "tests" is the gnulib unit test dir.
7SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4
8
9ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
10
11TESTFILE_SUFFIXES = .exp .xo .xe .xi
12
13# CONFIG_CLEAN_FILES = gnulib/lib/regex.c
14
15
16# DISTCLEANFILES = intl/libintl.h
17
18dist-hook: jy-regex-fix findutils-check-pofiles findutils-check-testfiles
19
20
09ef63fd jay2007-11-25 11:36:10 +000021## regex.c seems to get left out if I use automake-1.9 but not
22## if I use automake-1.7. Hence dist-hook has to be able to
23## copy regex.c into the relevant (read-only) directory if it
24## is not already there, but needs to avoid doing so if the
25## file is already in place. Ugh.
fd953b8d jay2007-11-25 11:41:01 +000026##
27## This problem appears not to apply to Automake-1.10, but since
28## gnulib only requires Automake-1.9.6, we should support that.
29## Therefore we probably can't remove this kludge yet.
30##
09ef63fd jay2007-11-25 11:36:10 +000031## -- James Youngman <jay@gnu.org>
32##
33jy-regex-fix:
34 if test -f $(distdir)/gnulib/lib/regex.c ; then \
35 echo regex.c is already in place. Great. ; \
36 else \
37 echo Making $(distdir)/gnulib/lib writable ... ; \
38 chmod +w $(distdir)/gnulib/lib ; \
39 echo Copying $(srcdir)/gnulib/lib/regex.c to $(distdir)/gnulib/lib ; \
40 cp $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib/regex.c ; \
41 fi
42# ls -ld $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib
43
44## Check that we actually shipped all the .po files. If this rule fails,
45## check ALL_LINGUAS in configure.in against the po files in the source
46## directory (their names, not their contents)
47findutils-check-pofiles:
48 @echo ; echo Checking to see if we distributed the full set of .po files
49 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 )
50 @echo All .po files distributed OK.
51
52## Check that we actually shipped all the test files that exist in the source.
53## runtest will run all the .exp files it finds, and so if we don't ship all
54## of them, there will be some tests which people using the CVS code will be
55## running, but people using the source distribution will not.
56findutils-check-testfiles:
57 @echo
58 $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
59
60
61findutils-check-smells:
62 find $(srcdir) \( -path $(srcdir)/autom4te.cache -o \
f619bdc3 jay2007-11-29 11:07:18 +000063 -path $(srcdir)/gnulib-git -o \
09ef63fd jay2007-11-25 11:36:10 +000064 -name .git -o \
65 \( -type d -name CVS \) \
66 \) -prune -o \
67 \( -type f -o -type l \) \
68 \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \
69 -print0 | \
70 xargs -0 python $(AUXDIR)/src-sniff.py