Bugfix: $(AM_FLAGS)/$(FLAGS) precedence in Yacc/Lex.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 8 Jun 2010 14:32:40 +0000 (16:32 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 21 Jun 2010 18:54:50 +0000 (20:54 +0200)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
automake.in
tests/Makefile.am
tests/Makefile.in

index 79fa7dc..2605ba4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       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 (file)
--- 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
index b0707d9..3b67405 100755 (executable)
@@ -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'],
index 20ce6e2..5c9e36a 100644 (file)
@@ -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
 
index 46ea92f..8b18055 100644 (file)
@@ -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 \