2 # Copyright (C) 2010-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 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
18 # with the PROGRAMS primary.
23 cat >> configure.ac << 'END'
28 cat > Makefile.am << 'END'
32 # Also try an empty match suffix, to ensure that the ':=' in there is
33 # not confused by the parser with an unportable assignment operator.
34 bin_PROGRAMS = $(t1:=-p) $(t2:2=y)
38 test -f $(prefix)/bin/foo1-p$(EXEEXT)
39 test -x $(prefix)/bin/foo1-p$(EXEEXT)
40 test -f $(prefix)/bin/foo2-p$(EXEEXT)
41 test -x $(prefix)/bin/foo2-p$(EXEEXT)
42 test -f $(prefix)/bin/barx$(EXEEXT)
43 test -x $(prefix)/bin/barx$(EXEEXT)
44 test -f $(prefix)/bin/bary$(EXEEXT)
45 test -x $(prefix)/bin/bary$(EXEEXT)
48 for f in foo1-p.c foo2-p.c barx.c bary.c; do
49 echo 'int main(void) { return 0; }' > $f
56 cwd=$(pwd) || fatal_ "getting current working directory"
57 ./configure --prefix="$cwd/_inst"