From: Stefano Lattarini Date: Tue, 8 Jun 2010 14:32:40 +0000 (+0200) Subject: Bugfix: $(AM_FLAGS)/$(FLAGS) precedence in Yacc/Lex. X-Git-Tag: v1.12.0b~377^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65a2059a21fa318e048af43a7a6628d7c5fd39a5;p=platform%2Fupstream%2Fautomake.git Bugfix: $(AM_FLAGS)/$(FLAGS) precedence in Yacc/Lex. * automake.in: Fix registration of languages "Lex", "Lex (C++)", "Yacc" and "Yacc (C++)", so that $(LFLAGS) has precedence over $(AM_LFLAGS) and $(YFLAGS) has precedence over $(AM_YFLAGS). * tests/Makefile.am (XFAIL_TESTS): Updated accordingly. * NEWS: Updated. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 79fa7dc..2605ba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-06-21 Stefano Lattarini + Fix bugs in Automake Yacc/Lex support w.r.t. $(AM_FLAGS) and + $(FLAGS) precedence. + * automake.in: Fix registration of languages "Lex", "Lex (C++)", + "Yacc" and "Yacc (C++)", so that $(LFLAGS) has precedence over + $(AM_LFLAGS) and $(YFLAGS) has precedence over $(AM_YFLAGS). + * tests/Makefile.am (XFAIL_TESTS): Updated accordingly. + * NEWS: Updated. + New tests, exposing bugs in Automake Yacc/Lex support w.r.t. $(AM_FLAGS) and $(FLAGS) precedence. * tests/lflags.test: New test, check that user $(LFLAGS) takes diff --git a/NEWS b/NEWS index 5b6c056..4a0fa94 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,11 @@ 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 diff --git a/automake.in b/automake.in index b0707d9..3b67405 100755 --- a/automake.in +++ b/automake.in @@ -832,7 +832,7 @@ register_language ('name' => 'yacc', 'Name' => 'Yacc', 'config_vars' => ['YACC'], 'flags' => ['YFLAGS'], - 'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)', + 'compile' => '$(YACC) $(AM_YFLAGS) $(YFLAGS)', 'ccer' => 'YACC', 'compiler' => 'YACCCOMPILE', 'extensions' => ['.y'], @@ -849,7 +849,7 @@ register_language ('name' => 'yaccxx', 'flags' => ['YFLAGS'], 'ccer' => 'YACC', 'compiler' => 'YACCCOMPILE', - 'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)', + 'compile' => '$(YACC) $(AM_YFLAGS) $(YFLAGS)', 'extensions' => ['.y++', '.yy', '.yxx', '.ypp'], 'output_extensions' => sub { (my $ext = $_[0]) =~ tr/y/c/; return ($ext,) }, @@ -863,7 +863,7 @@ register_language ('name' => 'lex', 'config_vars' => ['LEX'], 'rule_file' => 'lex', 'flags' => ['LFLAGS'], - 'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)', + 'compile' => '$(LEX) $(AM_LFLAGS) $(LFLAGS)', 'ccer' => 'LEX', 'compiler' => 'LEXCOMPILE', 'extensions' => ['.l'], @@ -877,7 +877,7 @@ register_language ('name' => 'lexxx', 'config_vars' => ['LEX'], 'rule_file' => 'lex', 'flags' => ['LFLAGS'], - 'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)', + 'compile' => '$(LEX) $(AM_LFLAGS) $(LFLAGS)', 'ccer' => 'LEX', 'compiler' => 'LEXCOMPILE', 'extensions' => ['.l++', '.ll', '.lxx', '.lpp'], diff --git a/tests/Makefile.am b/tests/Makefile.am index 20ce6e2..5c9e36a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,11 +21,7 @@ all.test \ auxdir2.test \ cond17.test \ gcj6.test \ -txinfo5.test \ -lflags.test \ -lflags2.test \ -yflags.test \ -yflags2.test +txinfo5.test include $(srcdir)/parallel-tests.am diff --git a/tests/Makefile.in b/tests/Makefile.in index 46ea92f..8b18055 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -248,11 +248,7 @@ all.test \ auxdir2.test \ cond17.test \ gcj6.test \ -txinfo5.test \ -lflags.test \ -lflags2.test \ -yflags.test \ -yflags2.test +txinfo5.test parallel_tests = \ check-p.test \