automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-250-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-250-gccea706
Date: Mon, 21 Jun 2010 19:14:26 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=ccea7069030cb2c9bf5ea1acb130a645dde36700

The branch, master has been updated
       via  ccea7069030cb2c9bf5ea1acb130a645dde36700 (commit)
       via  fee7d0d34e5cd1145c1de58466062704183f61c9 (commit)
       via  65a2059a21fa318e048af43a7a6628d7c5fd39a5 (commit)
       via  3d461fdcefdb9fcb1d4cfafc0226906c00ff77a3 (commit)
      from  7365964c1567882cb72a2a53ad58f5f0fb48a545 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ccea7069030cb2c9bf5ea1acb130a645dde36700
Merge: 7365964c1567882cb72a2a53ad58f5f0fb48a545 
fee7d0d34e5cd1145c1de58466062704183f61c9
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Jun 21 21:08:13 2010 +0200

    Merge branch 'sl-yacc-work'
    
    * sl-yacc-work:
      Fix minor testsuite issues, update docs, for Yacc/Lex changes.
      Bugfix: $(AM_FLAGS)/$(FLAGS) precedence in Yacc/Lex.
      New tests, for bugs in Yacc/Lex AM_FLAGS and FLAGS precedence.

commit fee7d0d34e5cd1145c1de58466062704183f61c9
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Jun 21 20:56:08 2010 +0200

    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 <address@hidden>

commit 65a2059a21fa318e048af43a7a6628d7c5fd39a5
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jun 8 16:32:40 2010 +0200

    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 <address@hidden>

commit 3d461fdcefdb9fcb1d4cfafc0226906c00ff77a3
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jun 8 16:32:40 2010 +0200

    New tests, for bugs in Yacc/Lex AM_FLAGS and FLAGS precedence.
    
    * tests/lflags.test: New test, check that user $(LFLAGS) takes
    precedence over automake (AM_LFLAGS) and (foo_LFLAGS).  Still
    xfailing.
    * tests/lflags2.test: Likewise.
    * tests/yflags.test: New test, check that user $(YFLAGS) takes
    precedence over automake (AM_YFLAGS) and (foo_YFLAGS).  Still
    xfailing.
    * tests/yflags2.test: Likewise.
    * tests/Makefile.am (TESTS, XFAIL_TESTS): Extended accordingly.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |   34 ++++++++++++++++++++++++
 NEWS               |    4 +++
 automake.in        |    8 +++---
 doc/automake.texi  |    8 +++---
 tests/Makefile.am  |    4 +++
 tests/Makefile.in  |    4 +++
 tests/lflags.test  |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/lflags2.test |   72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/yflags.test  |   69 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/yflags2.test |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 336 insertions(+), 8 deletions(-)
 create mode 100755 tests/lflags.test
 create mode 100755 tests/lflags2.test
 create mode 100755 tests/yflags.test
 create mode 100755 tests/yflags2.test

diff --git a/ChangeLog b/ChangeLog
index a754652..469578c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2010-06-21  Ralf Wildenhues  <address@hidden>
+
+       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  <address@hidden>
+
+       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
+       precedence over automake (AM_LFLAGS) and (foo_LFLAGS).  Still
+       xfailing.
+       * tests/lflags2.test: Likewise.
+       * tests/yflags.test: New test, check that user $(YFLAGS) takes
+       precedence over automake (AM_YFLAGS) and (foo_YFLAGS).  Still
+       xfailing.
+       * tests/yflags2.test: Likewise.
+       * tests/Makefile.am (TESTS, XFAIL_TESTS): Extended accordingly.
+
 2010-06-20  Stefano Lattarini  <address@hidden>
 
        Modernize, improve and extend tests `suffix*.test'.
diff --git a/NEWS b/NEWS
index 13b28c0..caffbb5 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,10 @@ Bugs fixed in 1.11a:
 
   - 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/automake.in b/automake.in
index be336a1..baab721 100644
--- 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/doc/automake.texi b/doc/automake.texi
index f5ccca1..f7f3507 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
address@hidden  The former is a user variable and the latter is
+When @code{yacc} is invoked, it is passed @code{AM_YFLAGS} and
address@hidden  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
address@hidden  The former is a user variable and the latter is
+When @command{lex} is invoked, it is passed @code{AM_LFLAGS} and
address@hidden  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/Makefile.am b/tests/Makefile.am
index 2771a66..d05426d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -419,6 +419,8 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lflags.test \
+lflags2.test \
 libexec.test \
 libobj2.test \
 libobj3.test \
@@ -801,6 +803,8 @@ yacc7.test \
 yacc8.test \
 yaccpp.test \
 yaccvpath.test \
+yflags.test \
+yflags2.test \
 $(parallel_tests)
 
 EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index db53cfb..aeeb0ca 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -630,6 +630,8 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lflags.test \
+lflags2.test \
 libexec.test \
 libobj2.test \
 libobj3.test \
@@ -1012,6 +1014,8 @@ yacc7.test \
 yacc8.test \
 yaccpp.test \
 yaccvpath.test \
+yflags.test \
+yflags2.test \
 $(parallel_tests)
 
 EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
diff --git a/tests/lflags.test b/tests/lflags.test
new file mode 100755
index 0000000..97de608
--- /dev/null
+++ b/tests/lflags.test
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that $(LFLAGS) takes precedence over both $(AM_LFLAGS) and
+# $(foo_LFLAGS).
+# Please keep this in sync with the sister tests lflags2.test, yflags.test
+# and yflags2.test
+
+. ./defs || Exit 1
+
+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
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+# Simulate presence of Lex using our fake-lex script.
+AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex])
+AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy])
+AC_SUBST([LEXLIB], [''])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = main.c foo.l
+bar_SOURCES = main.c bar.l
+AM_LFLAGS = __am_flags__
+bar_LFLAGS = __bar_flags__
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+
+echo 'int main(void){ return 0; }' > main.c
+: > foo.l
+: > bar.l
+
+$AUTOCONF
+./configure
+env LFLAGS=__user_flags__ $MAKE -e
+
+ls -l
+
+cat foo.c
+grep '__am_flags__.*__user_flags__' foo.c
+cat bar-bar.c
+grep '__bar_flags__.*__user_flags__' bar-bar.c
+
+:
diff --git a/tests/lflags2.test b/tests/lflags2.test
new file mode 100755
index 0000000..df766b2
--- /dev/null
+++ b/tests/lflags2.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that $(LFLAGS) takes precedence over both $(AM_LFLAGS) and
+# $(foo_LFLAGS).
+# Please keep this in sync with the sister tests lflags.test, yflags.test
+# and yflags2.test
+
+required=g++ # FIXME: any working C++ compiler should be OK
+. ./defs || Exit 1
+
+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
+
+cat >> configure.in <<'END'
+AC_PROG_CXX
+# Simulate presence of Lex using our fake-lex script.
+AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex])
+AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy])
+AC_SUBST([LEXLIB], [''])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = main.cc foo.ll
+bar_SOURCES = main.cc bar.l++
+AM_LFLAGS = __am_flags__
+bar_LFLAGS = __bar_flags__
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+
+echo 'int main(void) { return 0; }' > main.cc
+: > foo.ll
+: > bar.l++
+
+$AUTOCONF
+./configure
+env LFLAGS=__user_flags__ $MAKE -e
+
+ls -l
+
+cat foo.cc
+grep '__am_flags__.*__user_flags__' foo.cc
+cat bar-bar.c++
+grep '__bar_flags__.*__user_flags__' bar-bar.c++
+
+:
diff --git a/tests/yflags.test b/tests/yflags.test
new file mode 100755
index 0000000..fcb0c64
--- /dev/null
+++ b/tests/yflags.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that $(YFLAGS) takes precedence over both $(AM_YFLAGS) and
+# $(foo_YFLAGS).
+# Please keep this in sync with the sister tests yflags2.test, lflags.test
+# and lflags2.test
+
+. ./defs || Exit 1
+
+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
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+# Simulate presence of Yacc using our fake-yacc script.
+AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = main.c foo.y
+bar_SOURCES = main.c bar.y
+AM_YFLAGS = __am_flags__
+bar_YFLAGS = __bar_flags__
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+
+echo 'int main(void){ return 0; }' > main.c
+: > foo.y
+: > bar.y
+
+$AUTOCONF
+./configure
+env YFLAGS=__user_flags__ $MAKE -e
+
+ls -l
+
+cat foo.c
+grep '__am_flags__.*__user_flags__' foo.c
+cat bar-bar.c
+grep '__bar_flags__.*__user_flags__' bar-bar.c
+
+:
diff --git a/tests/yflags2.test b/tests/yflags2.test
new file mode 100755
index 0000000..346c2e4
--- /dev/null
+++ b/tests/yflags2.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that $(YFLAGS) takes precedence over both $(AM_YFLAGS) and
+# $(foo_YFLAGS).
+# Please keep this in sync with the sister tests yflags.test, lflags.test
+# and lflags2.test
+
+required=g++ # FIXME: any working C++ compiler should be OK
+. ./defs || Exit 1
+
+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
+
+cat >> configure.in <<'END'
+AC_PROG_CXX
+# Simulate presence of Yacc using our fake-yacc script.
+AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = main.cc foo.yy
+bar_SOURCES = main.cc bar.y++
+AM_YFLAGS = __am_flags__
+bar_YFLAGS = __bar_flags__
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+
+echo 'int main(void) { return 0; }' > main.cc
+: > foo.yy
+: > bar.y++
+
+$AUTOCONF
+./configure
+env YFLAGS=__user_flags__ $MAKE -e
+
+ls -l
+
+cat foo.cc
+grep '__am_flags__.*__user_flags__' foo.cc
+cat bar-bar.c++
+grep '__bar_flags__.*__user_flags__' bar-bar.c++
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]