Avoid leaking TEST_LOG_COMPILER in environment of test scripts.
[automake.git] / tests / clean2.test
blob99e4c2ef819ba4b8e75209c93df948a8f9c92c20
1 #! /bin/sh
2 # Copyright (C) 2004 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)
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 # Make sure distclean works in cygnus mode.
18 # Report from Daniel Jacobowitz
20 . ./defs || Exit 1
22 set -e
24 cat >> configure.in << 'END'
25 AM_MAINTAINER_MODE
26 AC_CONFIG_FILES([sub/Makefile])
27 AC_OUTPUT
28 END
30 cat > Makefile.am << 'END'
31 SUBDIRS = sub
32 END
34 mkdir sub
36 cat > sub/Makefile.am << 'END'
37 data_DATA = foo
39 foo:
40 touch $@
42 CLEANFILES = $(data_DATA)
43 END
45 $ACLOCAL
46 $AUTOCONF
47 $AUTOMAKE --cygnus
49 ./configure
50 $MAKE
51 test -f sub/foo
52 $MAKE distclean
53 test ! -f sub/foo