3231fb43ba1fc60b0ab16f459e63c85f8eb99710
[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 m4
8
9 bin_SCRIPTS = automake aclocal
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 depend2.am dist-vars.am footer.am \
16 header.am header-vars.am kr-extra.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 lisp-clean.am
22
23 ## These must all be executable when installed.
24 pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \
25 mkinstalldirs elisp-comp ylwrap
26
27 CLEANFILES = automake aclocal
28
29 # The following requires a fixed version of the Emacs 19.30 etags.
30 ETAGS_ARGS = automake.in aclocal.in --lang=none \
31  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
32 TAGS_DEPENDENCIES = automake.in aclocal.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 aclocal
47 ## Syntax check with default Perl (on my machine, Perl 5).
48         $(PERL) -c -w automake
49         $(PERL) -c -w aclocal
50 ## Ensure `true' is never used; I've accidentally used it before.
51         @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
52           echo "can't use 'true' in GNU Makefile" 1>&2; \
53           exit 1;                               \
54         else :; fi
55 ## expect no instances of '${...}'.  However, $${...} is ok, since that
56 ## is a shell construct, not a Makefile construct.
57         @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
58           echo "found too many uses of '\$${'" 1>&2; \
59           exit 1;                               \
60         else :; fi
61 ## Make sure all invocations of mkinstalldirs are correct.
62         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
63           echo "found incorrect use of mkinstalldirs" 1>&2; \
64           exit 1; \
65         else :; fi
66 ## Another syntax check, this time with Perl 4, if it exists.
67         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
68           perl4.036 -c -w automake; \
69           perl4.036 -c -w aclocal; \
70         else :; fi
71         $(MAKE) check
72
73 # Tag before making distribution.  Also, don't make a distribution if
74 # checks fail.  Also, make sure the NEWS file is up-to-date.
75 cvs-dist: maintainer-check
76         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
77           echo "NEWS not updated; not releasing" 1>&2; \
78           exit 1;                               \
79         fi
80         cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
81         $(MAKE) dist
82
83 cvs-diff:
84         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
85         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
86         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
87         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
88             > $(PACKAGE)-$$prevno-$(VERSION).diff