applied missing patches from Francois, verbatim
[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 SUBDIRS = tests m4
7
8 bin_SCRIPTS = automake aclocal
9 info_TEXINFOS = automake.texi
10
11 pkgdata_DATA = clean-kr.am clean.am compile-kr.am comp-vars.am \
12 compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
13 footer.am header.am header-vars.am kr-extra.am libs.am library.am \
14 libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \
15 remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
16 texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
17 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
18 lisp.am lisp-clean.am
19
20 ## These must all be executable when installed.
21 pkgdata_SCRIPTS = config.guess config.sub install-sh interlock \
22 mdate-sh missing mkinstalldirs elisp-comp ylwrap acinstall
23
24 EXTRA_DIST = acinstall $(pkgdata_DATA)
25
26 # The following requires a fixed version of the Emacs 19.30 etags.
27 ETAGS_ARGS = automake.in aclocal.in --lang=none \
28  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
29 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
30
31 ## `test -x' is not portable.  So we use Perl instead.  If Perl
32 ## doesn't exist, then this test is meaningless anyway.
33 # Check to make sure some installed files are executable.
34 installcheck-local:
35         for file in $(pkgdata_SCRIPTS); do \
36           $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
37         done
38
39 ################################################################
40 ##
41 ## Everything past here is useful to the maintainer, but probably not
42 ## to anybody else
43 ##
44
45 # Run the test suite using Perl 4.
46 perl4-check: automake aclocal
47         @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
48           $(MAKE) PERL=perl4.036 check; \
49         else :; fi
50
51 # Some simple checks, and then ordinary check.  These are only really
52 # guaranteed to work on my machine.
53 maintainer-check: automake aclocal
54 ## Syntax check with default Perl (on my machine, Perl 5).
55         $(PERL) -c -w automake
56         $(PERL) -c -w aclocal
57 ## Ensure `true' is never used; I've accidentally used it before.
58         @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
59           echo "can't use 'true' in GNU Makefile" 1>&2; \
60           exit 1;                               \
61         else :; fi
62 ## expect no instances of '${...}'.  However, $${...} is ok, since that
63 ## is a shell construct, not a Makefile construct.
64         @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
65           echo "found too many uses of '\$${'" 1>&2; \
66           exit 1;                               \
67         else :; fi
68 ## Make sure all invocations of mkinstalldirs are correct.
69         @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
70           echo "found incorrect use of mkinstalldirs" 1>&2; \
71           exit 1; \
72         else :; fi
73 ## Another syntax check, this time with Perl 4, if it exists.
74         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
75           perl4.036 -c -w automake; \
76           perl4.036 -c -w aclocal; \
77         else :; fi
78 ## We never want to use "undef", only "delete".
79         @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \
80           echo "Found undef in automake.in; use delete instead" 1>&2; \
81           exit 1; \
82         fi
83
84 # Tag before making distribution.  Also, don't make a distribution if
85 # checks fail.  Also, make sure the NEWS file is up-to-date.
86 cvs-dist: maintainer-check perl4-check distcheck
87         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
88           echo "NEWS not updated; not releasing" 1>&2; \
89           exit 1;                               \
90         fi
91         cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
92         $(MAKE) dist
93
94 cvs-diff:
95         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
96         if test -z "$$OLDVERSION"; then \
97           prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
98         else prevno="$$OLDVERSION"; fi; \
99         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
100         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
101             > $(PACKAGE)-$$prevno-$(VERSION).diff
102
103 ## Check our path lengths.
104 path-check: distdir
105         (cd $(distdir) && \
106 ## FIXME there's got to be a better way!  pathchk should take the list
107 ## of files on stdin, at least.
108           find . -print | xargs pathchk -p); \
109           status=$$?; \
110           rm -rf $(distdir); \
111           exit $$status