new ansi2knr
[platform/upstream/automake.git] / Makefile.am
1 ## Process this file with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = gnits
4 MAINT_CHARSET = latin1
5
6 SUBDIRS = tests m4
7
8 bin_SCRIPTS = automake aclocal
9 info_TEXINFOS = automake.texi
10
11 pkgdata_DATA = clean-kr.am clean.am clean-hdr.am comp-vars.am \
12 compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
13 footer.am header.am header-vars.am kr-extra.am libs.am library.am \
14 libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \
15 remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
16 texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
17 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
18 lisp.am lisp-clean.am mans.am java.am java-clean.am
19
20 ## These must all be executable when installed.
21 pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
22 mkinstalldirs elisp-comp ylwrap acinstall
23
24 EXTRA_DIST = acinstall $(pkgdata_DATA)
25
26 # The following requires a fixed version of the Emacs 19.30 etags.
27 ETAGS_ARGS = automake.in aclocal.in --lang=none \
28  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
29 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
30
31 ## `test -x' is not portable.  So we use Perl instead.  If Perl
32 ## doesn't exist, then this test is meaningless anyway.
33 installcheck-local:
34         for file in $(pkgdata_SCRIPTS); do \
35           $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
36         done
37
38 ################################################################
39 ##
40 ## Everything past here is useful to the maintainer, but probably not
41 ## to anybody else
42 ##
43
44 # Run the test suite using Perl 4.
45 perl4-check: automake aclocal
46         @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
47           $(MAKE) PERL=perl4.036 check; \
48         else :; fi
49
50 # Some simple checks, and then ordinary check.  These are only really
51 # guaranteed to work on my machine.
52 maintainer-check: automake aclocal
53 ## This check avoids accidental configure substitutions in the source.
54 ## There are exactly 8 lines that should be modified.  This works out
55 ## to 24 lines of diffs.
56         @if test `diff automake.in automake | wc -l` -ne 24; then \
57           echo "found too many diffs between automake.in and automake"; 1>&2; \
58           diff -c automake.in automake; \
59           exit 1; \
60         fi
61 ## Syntax check with default Perl (on my machine, Perl 5).
62         $(PERL) -c -w automake
63         $(PERL) -c -w aclocal
64 ## expect no instances of '${...}'.  However, $${...} is ok, since that
65 ## is a shell construct, not a Makefile construct.
66         @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
67           echo "found too many uses of '\$${'" 1>&2; \
68           exit 1;                               \
69         else :; fi
70 ## Make sure all invocations of mkinstalldirs are correct.
71         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
72           echo "found incorrect use of mkinstalldirs" 1>&2; \
73           exit 1; \
74         else :; fi
75 ## Another syntax check, this time with Perl 4, if it exists.
76         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
77           perl4.036 -c -w automake; \
78           perl4.036 -c -w aclocal; \
79         else :; fi
80 ## We never want to use "undef", only "delete".
81         @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \
82           echo "Found undef in automake.in; use delete instead" 1>&2; \
83           exit 1; \
84         fi
85 ## We never want split (/ /,...), only split (' ', ...).
86         @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
87           echo "Found bad split in automake.in" 1>&2; \
88           exit 1; \
89         fi
90
91 # Tag before making distribution.  Also, don't make a distribution if
92 # checks fail.  Also, make sure the NEWS file is up-to-date.
93 cvs-dist: maintainer-check perl4-check distcheck
94         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
95           echo "NEWS not updated; not releasing" 1>&2; \
96           exit 1;                               \
97         fi
98         cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
99         $(MAKE) dist
100
101 cvs-diff:
102         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
103         if test -z "$$OLDVERSION"; then \
104           prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
105         else prevno="$$OLDVERSION"; fi; \
106         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
107         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
108             > $(PACKAGE)-$$prevno-$(VERSION).diff
109
110 ## Check our path lengths.
111 path-check: distdir
112         (cd $(distdir) && \
113 ## FIXME there's got to be a better way!  pathchk should take the list
114 ## of files on stdin, at least.
115           find . -print | xargs pathchk -p); \
116           status=$$?; \
117           rm -rf $(distdir); \
118           exit $$status