2 # Copyright (C) 2002-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 that --program-transform works even when multiple files are
23 cat >>configure.ac
<<'END'
28 cat >Makefile.am
<<'EOF'
30 bin_SCRIPTS = s1.sh s2.sh
34 test -f inst/bin/p$(EXEEXT)
36 test -f inst/man/man1/m.1
38 test-install-foo: install
39 test -f inst/bin/foo$(EXEEXT)
41 test -f inst/man/man1/foo.1
42 test ! -f inst/bin/p1$(EXEEXT)
43 test ! -f inst/bin/p2$(EXEEXT)
44 test ! -f inst/bin/s1.sh
45 test ! -f inst/bin/s2.sh
46 test ! -f inst/man/man/m1.1
47 test ! -f inst/man/man/m2.1
69 cwd
=$
(pwd) || fatal_
"getting current working directory"
71 .
/configure
--program-transform-name='s/[12]//' --prefix "$cwd/inst" \
72 --mandir "$cwd/inst/man"
76 test $
(find inst
-type f
-print |
wc -l) -eq 0
78 # Also squash all file types in question.
80 # On newer Cygwin versions, that won't work, likely due to overly
81 # aggressive appending of '.exe' suffix when copying/renaming Windows
82 # executables. So let's skip this part of the test if we detect the
83 # faulty heuristic is present. See also:
84 # <http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html>
85 # <http://thread.gmane.org/gmane.os.cygwin/119380>
89 cp foo bar
&& cmp foo bar \
90 || skip_
"your Cygwin is too aggressive in tweaking '.exe' suffixes"
92 .
/configure
--program-transform-name='s/.*/foo/' --prefix "$cwd/inst" \
93 --mandir "$cwd/inst/man"
95 $MAKE test-install-foo
97 test $
(find inst
-type f
-print |
wc -l) -eq 0