automake-patches
[Top][All Lists]
Advanced

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

Re: CVS Bison vs. CVS Automake


From: Alexandre Duret-Lutz
Subject: Re: CVS Bison vs. CVS Automake
Date: Wed, 04 Jun 2003 21:31:10 +0200
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3 (gnu/linux)

>>> "Akim" == Akim Demaille <address@hidden> writes:

 Akim> For whatever reason, CVS Automake doesn't like CVS Bison.  I don't
 Akim> have time to track this down now.  Just FYI:
[...]
 Akim> automake: ####################
 Akim> automake: ## Internal Error ##
 Akim> automake: ####################
 Akim> automake: undefined variable AUTOMAKE_OPTIONS
[...]
 Akim> automake: Please contact <address@hidden>.
 Akim> at /usr/local/share/automake-1.7a/Automake/Channels.pm line 562
 Akim> Automake::Channels::msg('automake','','undefined variable 
AUTOMAKE_OPTIONS\x{a}All variables:\x{a}{\x{a}ACLOCAL:...') called at 
/usr/local/share/automake-1.7a/Automake/ChannelDefs.pm line 191
 Akim> Automake::ChannelDefs::prog_error('undefined variable 
AUTOMAKE_OPTIONS\x{a}All variables:\x{a}{\x{a}ACLOCAL:...') called at 
/usr/local/share/automake-1.7a/Automake/Variable.pm line 341
 Akim> Automake::Variable::rvar('AUTOMAKE_OPTIONS') called at 
/usr/local/bin/automake line 7501
 Akim> 
Automake::require_file_with_macro('Automake::Condition=HASH(0x83bb0fc)','AUTOMAKE_OPTIONS',0,'README-alpha')
 called at /usr/local/bin/automake line 4866
 Akim> Automake::handle_minor_options called at /usr/local/bin/automake line 
1299
 Akim> Automake::generate_makefile('Makefile','Makefile') called at 
/usr/local/bin/automake line 7860

 Akim> The Automake options are defined in configure.ac:

 Akim> AM_INIT_AUTOMAKE([1.7 check-news readme-alpha dist-bzip2])

Thanks!  I'm installing the following fix on HEAD and branch-1-7.
(The bug does not reveal itself on branch-1-7, but the call
to require_file_with_macro is wrong anyway.)

2003-06-04  Alexandre Duret-Lutz  <address@hidden>

        * tests/alpha.test: Really run $MAKE.  Augment to test
        subdirectories, and check-news report.
        * tests/alpha2.test: New file.  Bug report from Akim Demaille.
        * tests/gnits2.test: Make sure README-alpha is not distributed.
        * tests/Makefile.am (TESTS): Add alpha2.test.
        * automake.in (handle_minor_options): Distribute README-alpha
        using push_dist_common, not require_file_with_macro.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1463
diff -u -r1.1463 automake.in
--- automake.in 3 Jun 2003 21:09:22 -0000       1.1463
+++ automake.in 4 Jun 2003 19:14:55 -0000
@@ -4852,8 +4852,7 @@
            {
              # This means we have an alpha release.  See
              # GNITS_VERSION_PATTERN for details.
-             require_file_with_macro (TRUE, 'AUTOMAKE_OPTIONS',
-                                      FOREIGN, 'README-alpha');
+             push_dist_common ('README-alpha');
            }
        }
     }
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.494
diff -u -r1.494 Makefile.am
--- tests/Makefile.am   25 May 2003 20:05:50 -0000      1.494
+++ tests/Makefile.am   4 Jun 2003 19:14:56 -0000
@@ -20,6 +20,7 @@
 acsubst2.test \
 all.test \
 alpha.test \
+alpha2.test \
 amassign.test \
 ammissing.test \
 ansi.test \
Index: tests/alpha.test
===================================================================
RCS file: /cvs/automake/automake/tests/alpha.test,v
retrieving revision 1.6
diff -u -r1.6 alpha.test
--- tests/alpha.test    8 Sep 2002 13:07:55 -0000       1.6
+++ tests/alpha.test    4 Jun 2003 19:14:56 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -22,17 +22,34 @@
 # Jim Meyering.
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(zardoz, 1.5e)
-AC_CONFIG_FILES(Makefile)
+AC_INIT([alpha], [1.0a])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = gnits
+SUBDIRS = sub
+check-local: distdir
+       test -f $(distdir)/README-alpha
+       test -f $(distdir)/sub/README
+       test ! -f $(distdir)/sub/README-alpha
+       : > works
+END
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = gnits
 END
 
 : > README-alpha
+: > sub/README-alpha
+: > sub/README
 
 # Gnits stuff.
 : > INSTALL
@@ -43,7 +60,17 @@
 : > ChangeLog
 : > THANKS
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
-
-grep README-alpha Makefile.in
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+# make distdir should fail because NEWS does not mention 1.0a
+$MAKE check 2>stderr && exit 1
+cat stderr
+grep 'NEWS not updated' stderr
+test ! -f works
+
+echo 'alpha 1.0a released' > NEWS
+$MAKE check
+test -f works
Index: tests/alpha2.test
===================================================================
RCS file: tests/alpha2.test
diff -N tests/alpha2.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/alpha2.test   4 Jun 2003 19:14:56 -0000
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Another check for README-alpha support.  This time it is requested
+# from configure.in.  Report from Akim Demaille.
+
+. ./defs || exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([alpha], [1.0b])
+AM_INIT_AUTOMAKE([readme-alpha])
+AC_CONFIG_FILES([Makefile sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+check-local: distdir
+       test -f $(distdir)/README-alpha
+       test -f $(distdir)/sub/README
+       test ! -f $(distdir)/sub/README-alpha
+       : > works
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+: > README-alpha
+: > sub/README-alpha
+: > sub/README
+
+# Gnits stuff.
+: > INSTALL
+: > NEWS
+: > README
+: > COPYING
+: > AUTHORS
+: > ChangeLog
+: > THANKS
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE check
+test -f works
Index: tests/gnits2.test
===================================================================
RCS file: /cvs/automake/automake/tests/gnits2.test,v
retrieving revision 1.6
diff -u -r1.6 gnits2.test
--- tests/gnits2.test   13 Jan 2003 11:06:40 -0000      1.6
+++ tests/gnits2.test   4 Jun 2003 19:14:56 -0000
@@ -88,11 +88,17 @@
 : > ChangeLog
 : > THANKS
 
+# The following file should not be distributed.
+# (alpha.test checks the case where it must be distributed.)
+: > README-alpha
+
 set -e
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
+grep README-alpha Makefile.in && exit 1
 
 mkdir build
 cd build

-- 
Alexandre Duret-Lutz





reply via email to

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