2 # Copyright (C) 2001-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)
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/>.
18 # See also automake bug#11030.
20 # == Original Report for PR/203 ==
21 # Some standard targets are missing '-local' hooks. For instance,
22 # installdirs is missing this. Ideally this would be an automatic
23 # feature of any exported target.
27 echo AC_OUTPUT
>> configure.ac
29 cat > Makefile.am
<< 'END'
30 foodir
= $
(datadir
)/$
(distdir
)
32 $
(MKDIR_P
) $
(DESTDIR
)$
(foodir
)
33 install-data-hook
: installdirs-local
39 test $
(grep -c installdirs-local Makefile.
in) -eq 4
41 cwd
=$
(pwd) || fatal_
"getting current working directory"
44 .
/configure
--prefix="$cwd/inst"
47 test -d inst
/share
/$me-1.0
51 test -d inst
/share
/$me-1.0
54 .
/configure
--prefix=/foo
56 $MAKE installdirs DESTDIR
="$cwd/dest"
57 test -d dest
/foo
/share
/$me-1.0
60 $MAKE install DESTDIR
="$cwd/dest"
61 test -d dest
/foo
/share
/$me-1.0