Append $(EXEEXT) to programs that may be listed in TESTS.
[automake.git] / tests / distcom2.test
blob87843288a816600f5ac0de094c8a75dd1b0e77e5
1 #! /bin/sh
2 # Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Test to make sure that depcomp and compile are added to DIST_COMMON
22 # From Pavel Roskin.
24 . ./defs || exit 1
26 cat >> configure.in << 'END'
27 AC_PROG_CC
28 AM_PROG_CC_C_O
29 AC_CONFIG_FILES([subdir/Makefile])
30 AC_OUTPUT
31 END
33 cat > Makefile.am << 'END'
34 SUBDIRS = subdir
35 END
37 mkdir subdir
38 : > subdir/foo.c
40 cat > subdir/Makefile.am << 'END'
41 noinst_PROGRAMS = foo
42 foo_SOURCES = foo.c
43 foo_CFLAGS = -DBAR
44 END
46 rm -f compile depcomp
48 $ACLOCAL || exit 1
49 $AUTOMAKE --add-missing || exit 1
51 test -f compile || exit 1
52 test -f depcomp || exit 1
54 sed -n -e '/^DIST_COMMON =.*\\$/ {
55 :loop
58 t clear
59 :clear
60 s/\\$/\\/
61 t loop
64 }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile || exit 1
66 sed -n -e '/^DIST_COMMON =.*\\$/ {
67 :loop
70 t clear
71 :clear
72 s/\\$/\\/
73 t loop
76 }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp || exit 1