2 # Copyright (C) 2003, 2005, 2007, 2010 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/>.
17 # Make sure the install-exec-hook example we give in the manual works.
23 cat >>configure.
in <<'EOF'
28 cat >Makefile.am
<<'END'
29 dist_bin_SCRIPTS = foo
32 cd "$(DESTDIR)$(bindir)" && \
33 mv -f foo foo-$(VERSION) && \
34 $(LN_S) foo-$(VERSION) foo
37 test -f "$(bindir)/foo"
38 test -f "$(bindir)/foo-$(VERSION)"
39 : > $(top_srcdir)/../ok
42 rm -f $(DESTDIR)$(bindir)/foo-$(VERSION)
53 # Sanity check to make sure installcheck-local was run.
56 # Make sure that installing a second version doesn't erase the first
57 # one. (This is error prone since `foo' symlinks to `foo-1.0' and the
58 # second version will overwrite `foo'. Hopefully `install' and `install-sh'
59 # are smart enough to erase the `foo' symlink before installing the new
61 .
/configure
"--bindir=`pwd`/bin"
64 VERSION
=2.0 $MAKE -e install
69 # install-hook is an error.
70 cat >>Makefile.am
<<EOF
76 grep install-data-hook stderr
77 grep install-exec-hook stderr