Migrated from GPL version 2 to GPL version 3
[findutils.git] / Makefile.am
blobfddb2e479d804ef2e152304307decee650df30d5
1 AUTOMAKE_OPTIONS=gnits
2 # readme-alpha
4 EXTRA_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.
7 SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 
9 ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
11 TESTFILE_SUFFIXES = .exp .xo .xe .xi
13 # CONFIG_CLEAN_FILES = gnulib/lib/regex.c
16 # DISTCLEANFILES = intl/libintl.h
18 dist-hook: jy-regex-fix findutils-check-pofiles findutils-check-testfiles
22 ## regex.c seems to get left out if I use automake-1.9 but not 
23 ## if I use automake-1.7.   Hence dist-hook has to be able to 
24 ## copy regex.c into the relevant (read-only) directory if it 
25 ## is not already there, but needs to avoid doing so if the 
26 ## file is already in place.   Ugh.  
27 ##                             -- James Youngman <jay@gnu.org>
28 ## 
29 jy-regex-fix:
30         if test -f $(distdir)/gnulib/lib/regex.c ; then \
31                 echo regex.c is already in place.  Great. ; \
32         else \
33                 echo Making $(distdir)/gnulib/lib writable ... ; \
34                 chmod +w $(distdir)/gnulib/lib ; \
35                 echo Copying $(srcdir)/gnulib/lib/regex.c to $(distdir)/gnulib/lib ; \
36                 cp $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib/regex.c ; \
37         fi
38 #       ls -ld $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib
40 ## Check that we actually shipped all the .po files.  If this rule fails, 
41 ## check ALL_LINGUAS in configure.in against the po files in the source
42 ## directory (their names, not their contents)
43 findutils-check-pofiles:
44         @echo ; echo Checking to see if we distributed the full set of .po files
45         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 )
46         @echo All .po files distributed OK.
48 ## Check that we actually shipped all the test files that exist in the source.
49 ## runtest will run all the .exp files it finds, and so if we don't ship all 
50 ## of them, there will be some tests which people using the CVS code will be
51 ## running, but people using the source distribution will not.
52 findutils-check-testfiles:
53         @echo
54         $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
57 findutils-check-smells:
58         find  $(srcdir) \( -path $(srcdir)/autom4te.cache -o  \
59                            -path $(srcdir)/gnulib-cvs     -o  \
60                            -name .git             -o  \
61                            \( -type d -name CVS \)  \
62                        \) -prune -o                  \
63         \( -type f -o -type l \)  \
64         \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \
65         -print0 | \
66         xargs -0 python $(AUXDIR)/src-sniff.py