1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits 1.4
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 amdir = $(pkgdatadir)/am
16 dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
17 configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
18 footer.am header-vars.am header.am install.am java.am lex.am \
19 library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \
20 mans-vars.am mans.am multilib.am program.am progs.am python.am \
21 remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \
25 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1
27 ## These must all be executable when installed. However, if we use
28 ## _SCRIPTS, then the program transform will be applied, which is not
29 ## what we want. So we make them executable by hand.
30 scriptdir = $(pkgdatadir)
31 dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
32 mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile
36 @for prog in $(dist_script_DATA); do \
37 echo " chmod +x $(DESTDIR)$(scriptdir)/$$prog"; \
38 chmod +x $(DESTDIR)$(scriptdir)/$$prog; \
41 TAGS_FILES = automake.in aclocal.in $(amfiles)
43 # The following requires a fixed version of the Emacs 19.30 etags.
44 ETAGS_ARGS = --lang=none \
45 --regex='/^@node[ \t]+\([^,]+\)/\1/' $(srcdir)/automake.texi
46 TAGS_DEPENDENCIES = automake.texi
48 ## `test -x' is not portable. So we use Perl instead. If Perl
49 ## doesn't exist, then this test is meaningless anyway.
51 for file in $(dist_script_DATA); do \
52 $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
55 EXTRA_DIST = ChangeLog.1996 ChangeLog.1998
57 ################################################################
59 ## Everything past here is useful to the maintainer, but probably not
63 # Some simple checks, and then ordinary check. These are only really
64 # guaranteed to work on my machine.
65 maintainer-check: automake aclocal
66 ## This check avoids accidental configure substitutions in the source.
67 ## There are exactly 7 lines that should be modified. This works out
68 ## to 22 lines of diffs.
69 @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 30; then \
70 echo "found too many diffs between automake.in and automake"; 1>&2; \
71 diff -c $(srcdir)/automake.in automake; \
74 ## Syntax check with default Perl (on my machine, Perl 5).
75 $(PERL) -c -w automake
77 ## expect no instances of '${...}'. However, $${...} is ok, since that
78 ## is a shell construct, not a Makefile construct.
79 ## The backslash in `$${' is needed for some versions of bash.
80 @if fgrep '\$${' $(srcdir)/[a-z]*.am | \
81 fgrep -v '$$$$'; then \
82 echo "Found too many uses of '\$${' in the lines above." 1>&2; \
85 ## Make sure `rm' is called with `-f'.
86 @if egrep '\<rm ([^-]|\-[^f ]*\>)' \
87 $(srcdir)/[a-z]*.am $(srcdir)/tests/*.test | \
89 echo "Suspicious 'rm' invocation." 1>&2; \
92 ## Make sure all invocations of mkinstalldirs are correct.
93 @if fgrep -n 'mkinstalldirs' $(srcdir)/[a-z]*.am | \
94 fgrep -v '$$(mkinstalldirs)'; then \
95 echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
98 ## We never want to use "undef", only "delete", but for $/.
99 @if grep -n -w 'undef ' $(srcdir)/automake.in | \
100 fgrep -v 'undef $$/'; then \
101 echo "Found undef in automake.in; use delete instead" 1>&2; \
104 ## We never want split (/ /,...), only split (' ', ...).
105 @if fgrep -n 'split (/ /' $(srcdir)/automake.in; then \
106 echo "Found bad split in the lines above." 1>&2; \
109 ## Look for cd within backquotes without CDPATH=:
110 @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \
111 $(srcdir)/m4/*.m4; then \
112 echo "Consider setting CDPATH in the lines above" 1>&2; \
115 ## Using @_ in a scalar context is most probably a programming error.
116 @if grep -Hn '[^) ] *= *@_' $(srcdir)/automake.in; then \
117 echo "Using @_ in a scalar context in the lines above." 1>&2; \
120 ## Forbid using parens with `local' to ease counting.
121 @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
122 echo "Don't use \`local' with parens: use several \`local' above." >&2; \
125 ## Up to now we manage to limit to 1 use of local.
126 @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
129 echo "Wow, congrats! There are no \`local' now!." >&2; \
130 echo "Please update Makefile.am (maintainer-check)." >&2; \
135 echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \
136 echo "Up to now 1 was enough." >&2; \
140 ## Don't let AMDEP_TRUE substitution appear in automake.in.
141 @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
142 echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
146 # Tag before making distribution. Also, don't make a distribution if
147 # checks fail. Also, make sure the NEWS file is up-to-date.
148 cvs-dist: maintainer-check distcheck
149 @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
150 echo "NEWS not updated; not releasing" 1>&2; \
153 cd $(srcdir) && cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
157 thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
158 if test -z "$$OLDVERSION"; then \
159 prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
160 else prevno="$$OLDVERSION"; fi; \
161 prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
162 cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
163 > $(PACKAGE)-$$prevno-$(VERSION).diff
165 ## Check our path lengths.
168 ## FIXME there's got to be a better way! pathchk should take the list
169 ## of files on stdin, at least.
170 find . -print | xargs pathchk -p); \
172 chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir); \
175 ## Program to use to fetch files.
178 ## Files that we fetch and which we compare against.
179 ## FIXME should be a lot more here
180 FETCHFILES = config.guess config.sub
182 ## Fetch the latest versions of files we care about.
184 rm -rf Fetchdir > /dev/null 2>&1
186 ## If a get fails then that is a problem.
188 $(WGET) ftp://ftp.gnu.org/gnu/config/config.guess; \
189 $(WGET) ftp://ftp.gnu.org/gnu/config/config.sub)
190 ## Don't exit after test because we want to give as many errors as
192 @stat=0; for file in $(FETCHFILES); do \
193 if diff $(srcdir)/$$file Fetchdir/$$file > /dev/null 2>&1; then :; \
196 echo "install Fetchdir/$$file into srcdir and commit"; \