Various fixups
[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 PERL = @PERL@
6
7 SUBDIRS = tests
8
9 bin_SCRIPTS = automake
10 info_TEXINFOS = automake.texi
11 # SUBDIRS = intl po
12 # CONFIG_HEADER = config.h
13
14 pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
15 compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
16 header.am header-vars.am kr-vars.am libraries.am library.am \
17 mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
18 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
19 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
20 programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
21 ansi2knr.1 aclocal.m4 lisp.am
22
23 ## These must all be executable when installed.
24 pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh \
25 mkinstalldirs elisp-comp
26
27 CLEANFILES = automake
28
29 # The following requires a fixed version of the Emacs 19.30 etags.
30 ETAGS_ARGS = automake.in --lang=none \
31  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
32 TAGS_DEPENDENCIES = automake.in automake.texi
33
34 ## `test -x' is not portable.  So we use Perl instead.  If Perl
35 ## doesn't exist, then this test is meaningless anyway.
36 # Check to make sure some installed files are executable.
37 installcheck-local:
38         $(PERL) -e "exit ! -x '$(pkgdatadir)/config.guess';"
39         $(PERL) -e "exit ! -x '$(pkgdatadir)/config.sub';"
40         $(PERL) -e "exit ! -x '$(pkgdatadir)/install-sh';"
41         $(PERL) -e "exit ! -x '$(pkgdatadir)/mdate-sh';"
42         $(PERL) -e "exit ! -x '$(pkgdatadir)/mkinstalldirs';"
43
44 # Some simple checks, and then ordinary check.  These are only really
45 # guaranteed to work on my machine.
46 maintainer-check: automake
47 ## Syntax check with default Perl (on my machine, Perl 5).
48         $(PERL) -c -w automake
49 ## Ensure `true' is never used; I've accidentally used it before.
50         @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
51           echo "can't use 'true' in GNU Makefile" 1>&2; \
52           exit 1;                               \
53         else :; fi
54 ## expect no instances of '${...}'.  However, $${...} is ok, since that
55 ## is a shell construct, not a Makefile construct.
56         @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
57           echo "found too many uses of '\$${'" 1>&2; \
58           exit 1;                               \
59         else :; fi
60 ## Make sure all invocations of mkinstalldirs are correct.
61         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
62           echo "found incorrect use of mkinstalldirs" 1>&2; \
63           exit 1; \
64         else :; fi
65 ## Another syntax check, this time with Perl 4, if it exists.
66         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
67           perl4.036 -c -w automake; \
68         else :; fi
69         $(MAKE) check
70
71 # Tag before making distribution.  Also, don't make a distribution if
72 # checks fail.  Also, make sure the NEWS file is up-to-date.
73 cvs-dist: maintainer-check
74         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
75           echo "NEWS not updated; not releasing" 1>&2; \
76           exit 1;                               \
77         fi
78         cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
79         $(MAKE) dist
80
81 cvs-diff:
82         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
83         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
84         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
85         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
86             > $(PACKAGE)-$$prevno-$(VERSION).diff