* depend.am: Add @AMDEP@ before `include', so that dependency
[automake.git] / lib / am / Makefile.am
blob2f05b511cf42ebe4e5834708e272e85a8cc915af
1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits 1.4
4 MAINT_CHARSET = latin1
6 ## We need `.' in SUBDIRS because we want `check' to build `.' before
7 ## tests.
8 SUBDIRS = . m4 tests
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 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
22 $(amfiles)
24 ## These must all be executable when installed.  However, if we use
25 ## _SCRIPTS, then the program transform will be applied, which is not
26 ## what we want.  So we make them executable by hand.
27 scriptdir = $(pkgdatadir)
28 dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
29 mkinstalldirs elisp-comp ylwrap acinstall depcomp compile
31 install-data-hook:
32         @$(POST_INSTALL)
33         @for prog in $(dist_script_DATA); do \
34           echo " chmod +x $(DESTDIR)$(scriptdir)/$$prog"; \
35           chmod +x $(DESTDIR)$(scriptdir)/$$prog; \
36         done
38 # The following requires a fixed version of the Emacs 19.30 etags.
39 ETAGS_ARGS = automake.in aclocal.in --lang=none \
40  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
41 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
43 ## `test -x' is not portable.  So we use Perl instead.  If Perl
44 ## doesn't exist, then this test is meaningless anyway.
45 installcheck-local:
46         for file in $(dist_script_DATA); do \
47           $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
48         done
50 EXTRA_DIST = ChangeLog.1996 ChangeLog.1998
52 ################################################################
54 ## Everything past here is useful to the maintainer, but probably not
55 ## to anybody else
58 # Run the test suite using Perl 4.
59 perl4-check: automake aclocal
60         @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
61           $(MAKE) PERL=perl4.036 check; \
62         else :; fi
64 # Some simple checks, and then ordinary check.  These are only really
65 # guaranteed to work on my machine.
66 maintainer-check: automake aclocal
67 ## This check avoids accidental configure substitutions in the source.
68 ## There are exactly 7 lines that should be modified.  This works out
69 ## to 22 lines of diffs.
70         @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \
71           echo "found too many diffs between automake.in and automake"; 1>&2; \
72           diff -c $(srcdir)/automake.in automake; \
73           exit 1; \
74         fi
75 ## Syntax check with default Perl (on my machine, Perl 5).
76         $(PERL) -c -w automake
77         $(PERL) -c -w aclocal
78 ## expect no instances of '${...}'.  However, $${...} is ok, since that
79 ## is a shell construct, not a Makefile construct.
80 ## The backslash in `$${' is needed for some versions of bash.
81         @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
82           echo "found too many uses of '\$${'" 1>&2; \
83           exit 1;                               \
84         else :; fi
85 ## Make sure all invocations of mkinstalldirs are correct.
86         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
87           echo "found incorrect use of mkinstalldirs" 1>&2; \
88           exit 1; \
89         else :; fi
90 ## Another syntax check, this time with Perl 4, if it exists.
91         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
92           perl4.036 -c -w automake; \
93           perl4.036 -c -w aclocal; \
94         else :; fi
95 ## We never want to use "undef", only "delete".
96         @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \
97           echo "Found undef in automake.in; use delete instead" 1>&2; \
98           exit 1; \
99         fi
100 ## We never want split (/ /,...), only split (' ', ...).
101         @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
102           echo "Found bad split in automake.in" 1>&2; \
103           exit 1; \
104         fi
106 # Tag before making distribution.  Also, don't make a distribution if
107 # checks fail.  Also, make sure the NEWS file is up-to-date.
108 cvs-dist: maintainer-check perl4-check distcheck
109         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
110           echo "NEWS not updated; not releasing" 1>&2; \
111           exit 1;                               \
112         fi
113         cd $(srcdir) && cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
114         $(MAKE) dist
116 cvs-diff:
117         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
118         if test -z "$$OLDVERSION"; then \
119           prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
120         else prevno="$$OLDVERSION"; fi; \
121         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
122         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
123             > $(PACKAGE)-$$prevno-$(VERSION).diff
125 ## Check our path lengths.
126 path-check: distdir
127         (cd $(distdir) && \
128 ## FIXME there's got to be a better way!  pathchk should take the list
129 ## of files on stdin, at least.
130           find . -print | xargs pathchk -p); \
131           status=$$?; \
132           rm -rf $(distdir); \
133           exit $$status
135 ## Just get the .am files into TAGS.  We don't really care too much if
136 ## any interesting tags show up.
137 ETAGS_ARGS = $(amfiles)
138 TAGS_DEPENDENCIES = $(ETAGS_ARGS)