2 # Copyright (C) 2002, 2003, 2006, 2009, 2010, 2011 Free Software
5 # This file is part of GNU Automake.
7 # GNU Automake is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # GNU Automake is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Automake; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
22 # Tests that Automake understands suffix rules with renamed objects
24 # Reported by Florian Briegel.
30 cat >>configure.
in <<EOF
36 cat >Makefile.am
<< 'END'
37 AUTOMAKE_OPTIONS
= subdir-objects
40 case $@
in sub
/*) $
(MKDIR_P
) sub
;; *) :;; esac
41 ## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
42 cp `test -f '$<' || echo $(srcdir)/`$
< $@
44 DISTCLEANFILES
= sub
/bar.c
47 foo_SOURCES
= foo.c sub
/bar.baz
52 cat > sub
/bar.baz
<<'END'
54 int main () { return foo (); }
57 int foo () { return 0; }
69 # Should also work without subdir-objects
71 sed '/subdir-objects/d' < Makefile.am
> t