2 # Copyright (C) 2002, 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)
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 for PR 307: depcomp with depmode=dashmstdout libtool race condition
18 # Report from Laurent Morichetti.
19 # (Also exercises check_LTLIBRARIES.)
21 required='libtoolize gcc'
24 cat >> configure.in << 'END'
30 cat > Makefile.am << 'END'
31 check_LTLIBRARIES = librace.la
32 librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c
34 # Make sure the dependencies are updated.
36 for i in $(librace_la_SOURCES:.c=.Plo); do \
37 echo checking ./$(DEPDIR)/$$i; \
38 grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \
39 test `wc -l <tst` -eq 2 || exit 1; \
45 for i in a b c d e f g h; do
48 int $i() { return 0; }
59 # Sanity check: make sure the variable we are attempting to force
60 # is used by configure
61 grep am_cv_CC_dependencies_compiler_type configure
63 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
65 test -f librace.la && Exit 1
68 # The failure we check usually occurs during the above build,
69 # with an output such as
71 # mv -f .libs/f.lo f.lo
72 # mv: cannot stat `.libs/f.lo': No such file or directory
74 # (This may happen on `f' or on some other files.)
77 test -f tst # a proof that check-local was run