From fee7d0d34e5cd1145c1de58466062704183f61c9 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 21 Jun 2010 20:56:08 +0200 Subject: [PATCH] Fix minor testsuite issues, update docs, for Yacc/Lex changes. * doc/automake.texi (Yacc and Lex): Mention AM_YFLAGS, YFLAGS and AM_LFLAGS, LFLAGS in the order in which they now appear in the rules. * NEWS: Update. * tests/lflags.test, tests/lflags2.test, tests/yflags.test, tests/yflags2.test: Prefer `make -e' over `make VAR=VAL', to please maintainer-check. Ensure generated C files contain a declaration, to please compilers. Signed-off-by: Ralf Wildenhues --- ChangeLog | 12 ++++++++++++ NEWS | 9 ++++----- doc/automake.texi | 8 ++++---- tests/lflags.test | 3 ++- tests/lflags2.test | 3 ++- tests/yflags.test | 3 ++- tests/yflags2.test | 3 ++- 7 files changed, 28 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2605ba45a..98e5792cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-06-21 Ralf Wildenhues + + Fix minor testsuite issues, update docs, for Yacc/Lex changes. + * doc/automake.texi (Yacc and Lex): Mention AM_YFLAGS, YFLAGS + and AM_LFLAGS, LFLAGS in the order in which they now appear in + the rules. + * NEWS: Update. + * tests/lflags.test, tests/lflags2.test, tests/yflags.test, + tests/yflags2.test: Prefer `make -e' over `make VAR=VAL', to + please maintainer-check. Ensure generated C files contain a + declaration, to please compilers. + 2010-06-21 Stefano Lattarini Fix bugs in Automake Yacc/Lex support w.r.t. $(AM_FLAGS) and diff --git a/NEWS b/NEWS index 4a0fa94c7..b8a0f08c8 100644 --- a/NEWS +++ b/NEWS @@ -21,11 +21,6 @@ Bugs fixed in 1.11.0a: * Long standing bugs: - - Automake variables $(AM_LFLAGS) and $(AM_YFLAGS) took precedence over - user variables $(FLAGS) and $(YFLAGS) (respectively). This was in - contrast with both reasonable user's expectations and the Automake - manual; so the precedence is now the other way round. - - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python' even if the `--prefix' argument pointed outside of a system directory. AM_PATH_PYTHON has been fixed to ignore the value returned from python's @@ -43,6 +38,10 @@ Bugs fixed in 1.11.0a: - A per-Makefile.am setting of -Werror does not carry over to the handling of other Makefile.am files any more. + + - The order of Yacc and Lex flags is fixed to be consistent with other + languages: $(AM_YFLAGS) comes before $(YFLAGS), and $(AM_LFLAGS) before + $(LFLAGS), so that the user variables override the developer variables. New in 1.11: diff --git a/doc/automake.texi b/doc/automake.texi index 2bf32912a..ea500a915 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -6029,8 +6029,8 @@ Program Checks, autoconf, The Autoconf Manual}). @vindex YFLAGS @vindex AM_YFLAGS -When @code{yacc} is invoked, it is passed @code{YFLAGS} and -@code{AM_YFLAGS}. The former is a user variable and the latter is +When @code{yacc} is invoked, it is passed @code{AM_YFLAGS} and +@code{YFLAGS}. The latter is a user variable and the former is intended for the @file{Makefile.am} author. @code{AM_YFLAGS} is usually used to pass the @option{-d} option to @@ -6058,8 +6058,8 @@ autoconf, The Autoconf Manual}), but using @code{AM_PROG_LEX} macro @vindex LFLAGS @vindex AM_LFLAGS -When @command{lex} is invoked, it is passed @code{LFLAGS} and -@code{AM_LFLAGS}. The former is a user variable and the latter is +When @command{lex} is invoked, it is passed @code{AM_LFLAGS} and +@code{LFLAGS}. The latter is a user variable and the former is intended for the @file{Makefile.am} author. When @code{AM_MAINTAINER_MODE} (@pxref{maintainer-mode}) is used, the diff --git a/tests/lflags.test b/tests/lflags.test index 5027f1c6a..97de60851 100755 --- a/tests/lflags.test +++ b/tests/lflags.test @@ -26,6 +26,7 @@ set -e cat >fake-lex <<'END' #!/bin/sh echo '/*' "$*" '*/' >lex.yy.c +echo 'extern int dummy;' >> lex.yy.c END chmod a+x fake-lex @@ -58,7 +59,7 @@ echo 'int main(void){ return 0; }' > main.c $AUTOCONF ./configure -$MAKE LFLAGS=__user_flags__ +env LFLAGS=__user_flags__ $MAKE -e ls -l diff --git a/tests/lflags2.test b/tests/lflags2.test index e50678e87..df766b2b6 100755 --- a/tests/lflags2.test +++ b/tests/lflags2.test @@ -27,6 +27,7 @@ set -e cat >fake-lex <<'END' #!/bin/sh echo '/*' "$*" '*/' >lex.yy.c +echo 'extern int dummy;' >> lex.yy.c END chmod a+x fake-lex @@ -59,7 +60,7 @@ echo 'int main(void) { return 0; }' > main.cc $AUTOCONF ./configure -$MAKE LFLAGS=__user_flags__ +env LFLAGS=__user_flags__ $MAKE -e ls -l diff --git a/tests/yflags.test b/tests/yflags.test index d7d3fca56..fcb0c64a9 100755 --- a/tests/yflags.test +++ b/tests/yflags.test @@ -26,6 +26,7 @@ set -e cat >fake-yacc <<'END' #!/bin/sh echo '/*' "$*" '*/' >y.tab.c +echo 'extern int dummy;' >> y.tab.c END chmod a+x fake-yacc @@ -56,7 +57,7 @@ echo 'int main(void){ return 0; }' > main.c $AUTOCONF ./configure -$MAKE YFLAGS=__user_flags__ +env YFLAGS=__user_flags__ $MAKE -e ls -l diff --git a/tests/yflags2.test b/tests/yflags2.test index 5d5be1c49..346c2e4b3 100755 --- a/tests/yflags2.test +++ b/tests/yflags2.test @@ -27,6 +27,7 @@ set -e cat >fake-yacc <<'END' #!/bin/sh echo '/*' "$*" '*/' >y.tab.c +echo 'extern int dummy;' >> y.tab.c END chmod a+x fake-yacc @@ -57,7 +58,7 @@ echo 'int main(void) { return 0; }' > main.cc $AUTOCONF ./configure -$MAKE YFLAGS=__user_flags__ +env YFLAGS=__user_flags__ $MAKE -e ls -l -- 2.47.2