doc: typos in test file.
[automake.git] / t / lisp2.sh
blobc2b051323f7e761f5afa28f8429da78e2f332443
1 #! /bin/sh
2 # Copyright (C) 2002-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
19 . test-init.sh
22 : TRY 1 -- We lack both EMACS and lispdir.
24 cat > Makefile.am << 'END'
25 lisp_LISP = foo.el
26 END
28 $ACLOCAL
29 AUTOMAKE_fails
30 grep AM_PATH_LISPDIR stderr
31 grep '[Ll]isp source.*EMACS.* undefined' stderr
32 grep '[Ll]isp source.*lispdir.* undefined' stderr
33 grep ' add .*AM_PATH_LISPDIR' stderr
36 : TRY 2 -- Setting lispdir should not be enough.
38 cat > Makefile.am << 'END'
39 lispdir = /usr/share/emacs/site-lisp
40 lisp_LISP = foo.el
41 END
43 $ACLOCAL
44 AUTOMAKE_fails
45 grep 'lispdir.*undefined' stderr && exit 1
46 grep '[Ll]isp source.*EMACS.* undefined' stderr
47 grep 'define .*EMACS.* add .*AM_PATH_LISPDIR' stderr
50 : TRY 3 -- Setting EMACS should not be enough.
52 cat > Makefile.am << 'END'
53 EMACS = emacs
54 lisp_LISP = foo.el
55 END
57 $ACLOCAL
58 AUTOMAKE_fails
59 grep 'EMACS.*undefined' stderr && exit 1
60 grep '[Ll]isp source.*lispdir.* undefined' stderr
61 grep 'define .*lispdir.* add .*AM_PATH_LISPDIR' stderr
64 : TRY 4 -- Setting both EMACS and lispdir is OK.
66 cat > Makefile.am << 'END'
67 lispdir = /usr/share/emacs/site-lisp
68 EMACS = emacs
69 lisp_LISP = foo.el
70 END
72 $ACLOCAL
73 $AUTOMAKE -a