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