compile: implement library search to support MSVC static linking
[automake.git] / tests / subdir9.test
blobc73ca182397ce0b8b8c08f07c9fcece300d4f294
1 #! /bin/sh
2 # Copyright (C) 2004, 2010 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 # Test SUDBIRS with /.
19 . ./defs || Exit 1
21 set -e
23 cat >> configure.in << 'END'
24 AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
25 AC_OUTPUT
26 END
28 echo SUBDIRS = src/subdir >Makefile.am
30 mkdir src
31 mkdir src/subdir
32 mkdir src/subdir2
34 : >src/subdir/foo
35 : >src/subdir2/foo
37 cat >src/subdir/Makefile.am <<'EOF'
38 EXTRA_DIST = foo
39 SUBDIRS = ../subdir2
40 EOF
42 cat >src/subdir2/Makefile.am <<'EOF'
43 EXTRA_DIST = foo
44 EOF
46 distdir=$me-1.0
48 $ACLOCAL
49 $AUTOCONF
50 $AUTOMAKE --copy --add-missing
51 ./configure
52 $MAKE distdir
53 test -f $distdir/src/subdir/foo
54 test -f $distdir/src/subdir2/foo
55 $MAKE clean
56 $MAKE distclean
57 test ! -f src/subdir2/Makefile