Check gnulib out with native git, rather than git-cvspserver. This fixes Savannah...
[findutils.git] / Makefile.am
blob63bc38820b3de475b784b3f2d79da7f0f34891b4
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
21 ## 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.  
26 ## 
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 ## 
31 ##                             -- James Youngman <jay@gnu.org>
32 ## 
33 jy-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
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)
47 findutils-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.
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.
56 findutils-check-testfiles:
57         @echo
58         $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES)
61 findutils-check-smells:
62         find  $(srcdir) \( -path $(srcdir)/autom4te.cache -o  \
63                            -path $(srcdir)/gnulib-git     -o  \
64                            -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