tests: Let 'ltorder.sh' run successfully with Guix dynamic loader
[automake.git] / t / override-conditional-pr13940.sh
blob0eb53dbbfdd544057aadf757e234dfdf06cd7496
1 #! /bin/sh
2 # Copyright (C) 2013-2018 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 <https://www.gnu.org/licenses/>.
17 # Expose automake bug#1394: automake erroneously think that a .PHONY
18 # target's rule is overridden only because we declare dependencies
19 # to such targets twice: one in an Automake conditional, and once
20 # unconditionally.
22 . test-init.sh
24 cat >> configure.ac << 'END'
25 AM_CONDITIONAL([FOO], [true])
26 AC_OUTPUT
27 END
29 cat > Makefile.am << 'END'
30 # The conditional here is important: Automake only appears to warn
31 # when one of the all-local rules is inside a conditional and the
32 # other is not.
33 if FOO
34 all-local: bar
35 bar: ; @echo bar
36 endif
37 all-local: baz
38 baz: ; @echo baz
39 END
41 $ACLOCAL
42 $AUTOMAKE -a