1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits
6 ## We need `.' in SUBDIRS because we want `check' to build `.' before
10 bin_SCRIPTS = automake aclocal
11 info_TEXINFOS = automake.texi
13 amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
14 data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
15 footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \
16 library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \
17 ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am multilib.am \
18 program.am progs-clean.am progs.am remake-hdr.am remake.am scripts.am \
19 subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
21 pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 $(amfiles)
23 ## These must all be executable when installed. However, if we use
24 ## _SCRIPTS, then the program transform will be applied, which is not
25 ## what we want. So we make them executable by hand.
26 pkgdata_DATA = config.guess config.sub install-sh mdate-sh missing \
27 mkinstalldirs elisp-comp ylwrap acinstall
30 @for prog in $(pkgdata_DATA); do \
31 chmod +x $(pkgdatadir)/$$prog; \
34 EXTRA_DIST = acinstall $(pkgdata_DATA)
36 # The following requires a fixed version of the Emacs 19.30 etags.
37 ETAGS_ARGS = automake.in aclocal.in --lang=none \
38 --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
39 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
41 ## `test -x' is not portable. So we use Perl instead. If Perl
42 ## doesn't exist, then this test is meaningless anyway.
44 for file in $(pkgdata_SCRIPTS); do \
45 $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
48 ################################################################
50 ## Everything past here is useful to the maintainer, but probably not
54 # Run the test suite using Perl 4.
55 perl4-check: automake aclocal
56 @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
57 $(MAKE) PERL=perl4.036 check; \
60 # Some simple checks, and then ordinary check. These are only really
61 # guaranteed to work on my machine.
62 maintainer-check: automake aclocal
63 ## This check avoids accidental configure substitutions in the source.
64 ## There are exactly 8 lines that should be modified. This works out
65 ## to 24 lines of diffs.
66 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 24; then \
67 echo "found too many diffs between automake.in and automake"; 1>&2; \
68 diff -c $(srcdir)/automake.in automake; \
71 ## Syntax check with default Perl (on my machine, Perl 5).
72 $(PERL) -c -w automake
74 ## expect no instances of '${...}'. However, $${...} is ok, since that
75 ## is a shell construct, not a Makefile construct.
76 ## The backslash in `$${' is needed for some versions of bash.
77 @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
78 echo "found too many uses of '\$${'" 1>&2; \
81 ## Make sure all invocations of mkinstalldirs are correct.
82 @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
83 echo "found incorrect use of mkinstalldirs" 1>&2; \
86 ## Another syntax check, this time with Perl 4, if it exists.
87 @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
88 perl4.036 -c -w automake; \
89 perl4.036 -c -w aclocal; \
91 ## We never want to use "undef", only "delete".
92 @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \
93 echo "Found undef in automake.in; use delete instead" 1>&2; \
96 ## We never want split (/ /,...), only split (' ', ...).
97 @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
98 echo "Found bad split in automake.in" 1>&2; \
102 # Tag before making distribution. Also, don't make a distribution if
103 # checks fail. Also, make sure the NEWS file is up-to-date.
104 cvs-dist: maintainer-check perl4-check distcheck
105 @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
106 echo "NEWS not updated; not releasing" 1>&2; \
109 cd $(srcdir) && cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
113 thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
114 if test -z "$$OLDVERSION"; then \
115 prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
116 else prevno="$$OLDVERSION"; fi; \
117 prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
118 cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
119 > $(PACKAGE)-$$prevno-$(VERSION).diff
121 ## Check our path lengths.
124 ## FIXME there's got to be a better way! pathchk should take the list
125 ## of files on stdin, at least.
126 find . -print | xargs pathchk -p); \
131 ## Just get the .am files into TAGS. We don't really care too much if
132 ## any interesting tags show up.
133 ETAGS_ARGS = $(amfiles)
134 TAGS_DEPENDENCIES = $(ETAGS_ARGS)