automake: require ABOUT-NLS only at gnits strictness.
[automake.git] / t / lex-subobj-nodep.sh
bloba29c6001dcbd2c674f227517410e33c23bbdc12f
1 #! /bin/sh
2 # Copyright (C) 2011-2024 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 # Ensure subdirs for subdir scanners are generated when subdir-objects
18 # are used, even when dependency tracking is disabled.
20 required='cc lex'
21 . test-init.sh
23 cat >>configure.ac <<\END
24 AC_PROG_CC
25 AC_PROG_LEX
26 AC_OUTPUT
27 END
29 cat >Makefile.am <<\END
30 AUTOMAKE_OPTIONS = subdir-objects
31 AM_LFLAGS = --never-interactive
33 bin_PROGRAMS = p1 p2
34 p1_SOURCES = sub1/s1.l
35 p2_SOURCES = sub2/s2.l
36 p2_CPPFLAGS = -DWHATEVER
37 END
39 mkdir sub1 sub2
41 cat >sub1/s1.l <<\END
43 "END" return EOF;
46 int main (void)
48 while (yylex () != EOF)
50 return 0;
53 int yywrap(void)
55 return 1;
57 END
59 cp sub1/s1.l sub2/s2.l
61 $ACLOCAL
62 $AUTOCONF
63 $AUTOMAKE -a
64 mkdir build
65 cd build
66 ../configure --disable-dependency-tracking
67 $MAKE sub1/s1.c
68 $MAKE sub2/s2.c
69 rm -rf sub1 sub2
70 $MAKE