2 # Copyright (C) 2004-2012 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 # Check for _DEPENDENCIES definition with conditional _LDADD.
18 # Report from Elena A. Vengerova.
22 cat >>configure.ac
<<'EOF'
23 AM_CONDITIONAL([TWO], [test -n "$two"])
27 cat > Makefile.am
<<'EOF'
30 AUTOMAKE_OPTIONS=no-dependencies
32 bin_PROGRAMS = test1 test2
35 test1_LDADD = two.$(OBJEXT)
36 test2_LDADD = two.$(OBJEXT)
37 test2_DEPENDENCIES = $(test2_LDADD) somethingelse.a
39 test1_LDADD = one.$(OBJEXT)
40 test2_LDADD = three.$(OBJEXT)
43 test1_DEPENDENCIES = $(test1_LDADD) somethingelse.a
45 .PHONY: dep-test1 dep-test2
47 echo BEG: $(test1_DEPENDENCIES) :END
49 echo BEG: $(test2_DEPENDENCIES) :END
57 $MAKE dep-test1
>stdout ||
{ cat stdout
; exit 1; }
59 $FGREP 'BEG: one.z somethingelse.a :END' stdout
61 $MAKE dep-test2
>stdout ||
{ cat stdout
; exit 1; }
63 $FGREP 'BEG: three.z :END' stdout
67 $MAKE dep-test1
>stdout ||
{ cat stdout
; exit 1; }
69 $FGREP 'BEG: two.z somethingelse.a :END' stdout
71 $MAKE dep-test2
>stdout ||
{ cat stdout
; exit 1; }
73 $FGREP 'BEG: two.z somethingelse.a :END' stdout