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