Implement conditional AC_CONFIG_FILES: AM_COND_IF.
[automake/ericb.git] / tests / gnumake.test
blobbe00fd84dbff87435d443da264b7b5d36acc69df
1 #! /bin/sh
2 # Copyright (C) 2003 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 3, or (at your option)
7 # any later version.
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 # Automake should not assume that make files are called Makefile.
18 # Report from Braden McDaniel.
20 required=GNUmake
21 . ./defs || exit 1
23 set -e
25 cat >> configure.in << 'END'
26 AC_CONFIG_FILES([sub/GNUmakefile])
27 AC_OUTPUT
28 END
30 mkdir sub
32 echo SUBDIRS = sub > Makefile.am
34 cat > sub/GNUmakefile.am <<'EOF'
35 # In this project, the Makefile is an installed data file.
36 dist_data_DATA = Makefile
37 EOF
39 echo 'this should not cause any problem' > sub/Makefile
41 $ACLOCAL
42 $AUTOCONF
43 $AUTOMAKE
44 ./configure
45 $MAKE distcheck