2 # Copyright (C) 2003-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/>.
17 # Make sure the install-exec-hook example we give in the manual works.
21 cat >>configure.ac
<<'EOF'
26 cat >Makefile.am
<<'END'
27 dist_bin_SCRIPTS = foo
30 cd "$(DESTDIR)$(bindir)" && \
31 mv -f foo foo-$(VERSION) && \
32 $(LN_S) foo-$(VERSION) foo
35 test -f "$(bindir)/foo"
36 test -f "$(bindir)/foo-$(VERSION)"
37 : > $(top_srcdir)/../ok
40 rm -f $(DESTDIR)$(bindir)/foo-$(VERSION)
51 # Sanity check to make sure installcheck-local was run.
54 # Make sure that installing a second version doesn't erase the first
55 # one. (This is error prone since 'foo' symlinks to 'foo-1.0' and the
56 # second version will overwrite 'foo'. Hopefully 'install' and 'install-sh'
57 # are smart enough to erase the 'foo' symlink before installing the new
59 .
/configure
"--bindir=$(pwd)/bin"
62 VERSION
=2.0 $MAKE -e install
67 # install-hook is an error.
68 cat >>Makefile.am
<<EOF
74 grep install-data-hook stderr
75 grep install-exec-hook stderr