2 # Copyright (C) 2011-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 that automake can cope with user-redefinition of $(YFLAGS)
18 # at configure time and/or at make time.
25 cat >> configure.ac <<'END'
31 cat > Makefile.am <<'END'
34 # A minor automake wart: automake doesn't generate code to clean
35 # '*.output' files generated by yacc (it's not even clear if that
36 # would be useful in general, so it's probably better to be
38 CLEANFILES = foo.output
39 # Another automake wart: '-d' flag won't be given at automake time,
40 # so automake won't be able to generate code to clean 'foo.h' :-(
41 MAINTAINERCLEANFILES = foo.h
46 int yylex () { return 0; }
47 void yyerror (char *s) { return; }
48 int main () { return 0; }
51 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
58 ./configure YFLAGS='-d -v'
65 $MAKE maintainer-clean
68 ./configure YFLAGS='-v'
75 $MAKE maintainer-clean
78 ./configure YFLAGS='-v'
85 $MAKE maintainer-clean