fixlet
[automake.git] / Makefile.am
blob8f2a1d6d9397a4b9431effed28d362ed3b9e7cae
1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits
4 MAINT_CHARSET = latin1
5 PERL = @PERL@
7 SUBDIRS = tests m4
9 bin_SCRIPTS = automake aclocal
10 info_TEXINFOS = automake.texi
11 # SUBDIRS = intl po
12 # CONFIG_HEADER = config.h
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
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 acinstall
26 EXTRA_DIST = acinstall
28 # The following requires a fixed version of the Emacs 19.30 etags.
29 ETAGS_ARGS = automake.in aclocal.in --lang=none \
30  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
31 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
33 ## `test -x' is not portable.  So we use Perl instead.  If Perl
34 ## doesn't exist, then this test is meaningless anyway.
35 # Check to make sure some installed files are executable.
36 installcheck-local:
37         for file in $(pkgdata_SCRIPTS); do \
38           $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
39         done
41 # Some simple checks, and then ordinary check.  These are only really
42 # guaranteed to work on my machine.
43 maintainer-check: automake aclocal
44 ## Syntax check with default Perl (on my machine, Perl 5).
45         $(PERL) -c -w automake
46         $(PERL) -c -w aclocal
47 ## Ensure `true' is never used; I've accidentally used it before.
48         @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
49           echo "can't use 'true' in GNU Makefile" 1>&2; \
50           exit 1;                               \
51         else :; fi
52 ## expect no instances of '${...}'.  However, $${...} is ok, since that
53 ## is a shell construct, not a Makefile construct.
54         @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
55           echo "found too many uses of '\$${'" 1>&2; \
56           exit 1;                               \
57         else :; fi
58 ## Make sure all invocations of mkinstalldirs are correct.
59         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
60           echo "found incorrect use of mkinstalldirs" 1>&2; \
61           exit 1; \
62         else :; fi
63 ## Another syntax check, this time with Perl 4, if it exists.
64         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
65           perl4.036 -c -w automake; \
66           perl4.036 -c -w aclocal; \
67         else :; fi
69 # Tag before making distribution.  Also, don't make a distribution if
70 # checks fail.  Also, make sure the NEWS file is up-to-date.
71 cvs-dist: maintainer-check distcheck
72         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
73           echo "NEWS not updated; not releasing" 1>&2; \
74           exit 1;                               \
75         fi
76         cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
77         $(MAKE) dist
79 cvs-diff:
80         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
81         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
82         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
83         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
84             > $(PACKAGE)-$$prevno-$(VERSION).diff
86 ## Check our path lengths.
87 path-check: distdir
88         (cd $(distdir) && \
89 ## FIXME there's got to be a better way!  pathchk should take the list
90 ## of files on stdin, at least.
91           find . -print | xargs pathchk -p); \
92           status=$$?; \
93           rm -rf $(distdir); \
94           exit $$status