Merge branch 'yacc-quote-fix'
[automake.git] / tests / aclocal-path-install.test
blob34124e6f342ee444408240217b4875d8de3c7a3c
1 #! /bin/sh
2 # Copyright (C) 2011-2012 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 <http://www.gnu.org/licenses/>.
17 # ACLOCAL_PATH and `--install' interactions.
19 am_create_testdir=empty
20 . ./defs || Exit 1
22 cat > configure.in << 'END'
23 AC_INIT
24 AM_FOO
25 END
27 mkdir acdir pdir ldir
29 ACLOCAL="$ACLOCAL --system-acdir=`pwd`/acdir"
30 ACLOCAL_PATH=./pdir; export ACLOCAL_PATH
32 cat > acdir/foo.m4 << 'END'
33 AC_DEFUN([AM_FOO], [:])
34 END
36 cat > pdir/bar.m4 << 'END'
37 AC_DEFUN([AM_BAR], [:])
38 END
40 # The `--install' option should never cause anything to be installed
41 # in a directory specified in ACLOCAL_PATH.
42 $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
43 cat stderr >&2
44 grep ' no -I was supplied' stderr
45 test ! -f pdir/foo.m4
47 # The `--install' option should cause a required macro found in a
48 # directory specified in ACLOCAL_PATH to be installed locally.
49 echo AM_BAR >> configure.in
50 $ACLOCAL --install -I ldir
51 diff pdir/bar.m4 ldir/bar.m4