1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits 1.4 dist-bzip2
6 ## We need `.' in SUBDIRS because we want `check' to build `.' before
8 SUBDIRS = . m4 lib tests
10 bin_SCRIPTS = automake aclocal
11 info_TEXINFOS = automake.texi
14 TAGS_FILES = automake.in aclocal.in
16 # The following requires a fixed version of the Emacs 19.30 etags.
17 ETAGS_ARGS = --lang=none \
18 --regex='/^@node[ \t]+\([^,]+\)/\1/' $(srcdir)/automake.texi
19 TAGS_DEPENDENCIES = automake.texi
21 EXTRA_DIST = ChangeLog.1996 ChangeLog.1998
23 ################################################################
25 ## Everything past here is useful to the maintainer, but probably not
29 # Some simple checks, and then ordinary check. These are only really
30 # guaranteed to work on my machine.
31 maintainer-check: automake aclocal
32 ## This check avoids accidental configure substitutions in the source.
33 ## There are exactly 7 lines that should be modified. This works out
34 ## to 22 lines of diffs.
35 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
36 echo "found too many diffs between automake.in and automake"; 1>&2; \
37 diff -c $(srcdir)/automake.in automake; \
40 ## Syntax check with default Perl (on my machine, Perl 5).
41 perllibdir=$(srcdir)/lib $(PERL) -c -w automake
42 perllibdir=$(srcdir)/lib $(PERL) -c -w aclocal
43 ## expect no instances of '${...}'. However, $${...} is ok, since that
44 ## is a shell construct, not a Makefile construct.
45 ## The backslash in `$${' is needed for some versions of bash.
46 @if fgrep '\$${' $(srcdir)/lib/am/[a-z]*.am | \
47 fgrep -v '$$$$'; then \
48 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
51 ## Make sure `rm' is called with `-f'.
52 @if egrep '\<rm ([^-]|\-[^f ]*\>)' \
53 $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
55 echo "Suspicious 'rm' invocation." 1>&2; \
58 ## Make sure all invocations of mkinstalldirs are correct.
59 @if fgrep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
60 fgrep -v '$$(mkinstalldirs)'; then \
61 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
64 ## We never want to use "undef", only "delete", but for $/.
65 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
66 fgrep -v 'undef $$/'; then \
67 echo "Found undef in automake.in; use delete instead" 1>&2; \
70 ## We never want split (/ /,...), only split (' ', ...).
71 @if fgrep -n 'split (/ /' $(srcdir)/automake.in; then \
72 echo "Found bad split in the lines above." 1>&2; \
75 ## Look for cd within backquotes without CDPATH=:
76 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
77 $(srcdir)/lib/am/*.am $(srcdir)/m4/*.m4; then \
78 echo "Consider setting CDPATH in the lines above" 1>&2; \
81 ## Using @_ in a scalar context is most probably a programming error.
82 @if grep -Hn '[^) ] *= *@_' $(srcdir)/automake.in; then \
83 echo "Using @_ in a scalar context in the lines above." 1>&2; \
86 ## Forbid using parens with `local' to ease counting.
87 @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
88 echo "Don't use \`local' with parens: use several \`local' above." >&2; \
91 ## Up to now we manage to limit to 1 use of local.
92 @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
95 echo "Wow, congrats! There are no \`local' now!." >&2; \
96 echo "Please update Makefile.am (maintainer-check)." >&2; \
101 echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \
102 echo "Up to now 1 was enough." >&2; \
106 ## Don't let AMDEP_TRUE substitution appear in automake.in.
107 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
108 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
112 # Tag before making distribution. Also, don't make a distribution if
113 # checks fail. Also, make sure the NEWS file is up-to-date.
114 cvs-dist: maintainer-check distcheck
115 @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
116 echo "NEWS not updated; not releasing" 1>&2; \
119 cd $(srcdir) && cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
123 thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
124 if test -z "$$OLDVERSION"; then \
125 prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
126 else prevno="$$OLDVERSION"; fi; \
127 prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
128 cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
129 > $(PACKAGE)-$$prevno-$(VERSION).diff
131 ## Check our path lengths.
134 ## FIXME there's got to be a better way! pathchk should take the list
135 ## of files on stdin, at least.
136 find . -print | xargs pathchk -p); \
138 chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \
141 ## Program to use to fetch files.
144 ## Files that we fetch and which we compare against.
145 ## FIXME should be a lot more here
146 FETCHFILES = config.guess config.sub
148 ## Fetch the latest versions of files we care about.
150 rm -rf Fetchdir > /dev/null 2>&1
152 ## If a get fails then that is a problem.
154 $(WGET) ftp://ftp.gnu.org/gnu/config/config.guess; \
155 $(WGET) ftp://ftp.gnu.org/gnu/config/config.sub)
156 ## Don't exit after test because we want to give as many errors as
158 @stat=0; for file in $(FETCHFILES); do \
159 if diff $(srcdir)/$$file Fetchdir/$$file > /dev/null 2>&1; then :; \
162 echo "install Fetchdir/$$file into srcdir and commit"; \