2 # Copyright (C) 2001-2013 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 to make sure Automake supports implicit rules with dot-less
18 # extensions. Se also related "grepping" test 'suffix6.sh'.
20 required
=GNUmake
# Other makes might not grok dot-less suffix rules.
23 cat >> configure.ac
<< 'END'
24 # $(LINK) is not defined automatically by Automake, since the *_SOURCES
25 # variables don't contain any known extension (.c, .cc, .f, ...).
26 # So we need this hack -- but since such an hack can also serve as a
27 # mild stress test, that's ok.
28 AC_SUBST
([LINK
], ['cat >$@'])
29 AC_SUBST
([OBJEXT
], [oOo
])
30 AC_SUBST
([EXEEXT
], [.XxX
])
34 cat > Makefile.am
<< 'END'
35 SUFFIXES
= a b c .$
(OBJEXT
)
39 { echo '=ab=' && cat $
<; } >$@
41 { echo '=bc=' && cat $
<; } >$@
43 { echo '=b.obj=' && cat $
<; } >$@
47 : Implicit intermediate files should be removed by GNU
make ...
50 : ... but object files should not.
54 : Now check that the chain of implicit rules has been executed
55 : completely and
in the correct order.
56 (echo =b.obj
= && echo =bc= && echo =ab
= && echo =src
=) > exp