2 # Copyright (C) 2002, 2003, 2004, 2007, 2008, 2012 Free Software
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Make sure that --program-transform works even when multiple files are
25 cat >>configure.in <<'END'
30 cat >Makefile.am <<'EOF'
32 bin_SCRIPTS = s1.sh s2.sh
36 test -f inst/bin/p$(EXEEXT)
38 test -f inst/man/man1/m.1
40 test-install-foo: install
41 test -f inst/bin/foo$(EXEEXT)
43 test -f inst/man/man1/foo.1
44 test ! -f inst/bin/p1$(EXEEXT)
45 test ! -f inst/bin/p2$(EXEEXT)
46 test ! -f inst/bin/s1.sh
47 test ! -f inst/bin/s2.sh
48 test ! -f inst/man/man/m1.1
49 test ! -f inst/man/man/m2.1
71 ./configure --program-transform-name='s/[12]//' --prefix "`pwd`/inst" --mandir "`pwd`/inst/man"
75 test `find inst -type f -print | wc -l` = 0
77 # Also squash all file types in question.
79 # On newer Cygwin versions, that won't work, likely due to overly
80 # aggressive appending of '.exe' suffix when copying/renaming Windows
81 # executables). So let's skip this part of the test if we detect the
82 # faulty heuristic is present. See also:
83 # <http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html>
84 # <http://thread.gmane.org/gmane.os.cygwin/119380>
88 cp foo bar && cmp foo bar \
89 || skip_ "your Cygwin is too aggressive in tweaking '.exe' suffixes"
91 ./configure --program-transform-name='s/.*/foo/' --prefix "`pwd`/inst" --mandir "`pwd`/inst/man"
93 $MAKE test-install-foo
95 test `find inst -type f -print | wc -l` = 0