2 # Copyright (C) 2006 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)
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 # Check dependency generation (non libtool case).
23 cat >> configure.
in << 'END'
27 AC_CONFIG_FILES
(sub
2/Makefile
)
31 mkdir sub sub2 sub
2/sub3
33 cat >Makefile.am
<<'END'
36 foo_SOURCES = foo.c sub/bar.c foo.h sub/bar.h
37 foo_LDADD = sub2/libbaz.a
40 cat >sub
2/Makefile.am
<<'END'
41 AUTOMAKE_OPTIONS = subdir-objects
42 noinst_LIBRARIES = libbaz.a
43 libbaz_a_SOURCES = baz.c sub3/ba3.c baz.h sub3/ba3.h
50 int main() { printf("foo"); return bar() + baz(); }
58 cat >sub
/bar.c
<<'END'
60 int bar() { return 0; }
65 cat >sub
/bar.h
<<'END'
70 cat >sub
2/baz.c
<<'END'
72 int baz() { return 0; }
75 cat >sub
2/baz.h
<<'END'
79 cat >sub
2/sub
3/ba3.c
<<'END'
81 int ba3() { return 0; }
88 .
/configure
--enable-dependency-tracking
91 # check that dependency tracking works
92 if grep 'depmode=none' Makefile
; then :
96 echo 'choke me' > sub
3/ba3.h
97 if $MAKE; then Exit
1; fi