automake-patches
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] Re: CVS Bug? or User error?


From: Derek Robert Price
Subject: Re: [Bug-gnulib] Re: CVS Bug? or User error?
Date: Wed, 28 Jul 2004 20:13:21 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Alexandre Duret-Lutz wrote:

>Hi Derek,
>
>  
>
>>>>"Derek" == Derek Robert Price <address@hidden> writes:
>>>>        
>>>>
>
>[...]
>
> Derek> Sorry about that - I was sure I knew what I was doing
> Derek> and didn't run the entire test suite after making this
> Derek> change.  I've included a new patch with minor changes to
> Derek> lib/am/yacc.am and lib/am/lex.am to allow yacc and lex
> Derek> targets when AM_MAINTAINER_MODE has not been invoked in
> Derek> configure.ac.  The whole test suite now passes with this
> Derek> change.  This patch takes the place of the last.
> Derek> ChangeLog is unaltered.
>
>Thank you.  Sorry for the delay, I've been quite busy these
>days.  I saw you committed it, probably because I didn't answer,
>  
>


Yes.  I sent an "FYI" email but for some reason it didn't make it
through to the list.  Don't know why - I just verified that my patch
emailer script appears to be working.  Anyhow, it looked like this:

Derek Price wrote:

>No one has commented on this patch over the last few weeks and, as I think I
>met Alexandre's earlier requirements and it all passes `make check', I
>interpreted no comment as, "no objections."  I committed it a few minutes ago.
>
>Derek
>
>2004-07-26  Derek R. Price  <address@hidden>
>
>       * lib/am/yacc.am, lib/am/lex.am: Only compile these targets in
>       maintainer mode.
>       * doc/automake.texi (Yacc and Lex): Note dependence on maintainer mode.
>       * NEWS: Note same dependency.
>       * tests/mmode-lexyacc.test: New file.
>
>Index: NEWS
>===================================================================
>RCS file: /cvs/automake/automake/NEWS,v
>retrieving revision 1.280
>diff -u -p -r1.280 NEWS
>--- NEWS       17 Jul 2004 14:56:15 -0000      1.280
>+++ NEWS       23 Jul 2004 00:26:19 -0000
>@@ -93,6 +93,9 @@ New in 1.8e:
> 
>   - The manual tells more about SUBDIRS vs. DIST_SUBDIRS.
>     It also gives an example of nested packages using AC_CONFIG_SUBDIRS.
>+
>+  - Yacc and Lex intermediate files are now only built when in maintainer mode
>+    once AM_MAINTAINER_MODE has been invoked.
> 
> Bugs fixed in 1.8.5:
> 
>Index: doc/automake.texi
>===================================================================
>RCS file: /cvs/automake/automake/doc/automake.texi,v
>retrieving revision 1.42
>diff -u -p -r1.42 automake.texi
>--- doc/automake.texi  22 Jul 2004 17:22:33 -0000      1.42
>+++ doc/automake.texi  23 Jul 2004 00:26:26 -0000
>@@ -3765,6 +3765,10 @@ When @code{lex} is invoked, it is passed
> @samp{AM_LFLAGS}.  The former is a user variable and the latter is
> intended for the @file{Makefile.am} author.
> 
>+Automake only rebuilds intermediate files for Yacc and Lex sources in
>+maintainer mode once AM_MAINTAINER_MODE has been invoked
>+(@pxref{maintainer-mode}).
>+
> 
> 
> @cindex ylwrap
>Index: lib/am/lex.am
>===================================================================
>RCS file: /cvs/automake/automake/lib/am/lex.am,v
>retrieving revision 1.9
>diff -u -p -r1.9 lex.am
>--- lib/am/lex.am      6 Mar 2003 21:11:48 -0000       1.9
>+++ lib/am/lex.am      23 Jul 2004 00:26:26 -0000
>@@ -18,6 +18,7 @@
> 
> ?GENERIC?%EXT%%DERIVED-EXT%:
> ?!GENERIC?%OBJ%: %SOURCE%
>+?MAINTAINER-MODE?if MAINTAINER_MODE
> if %?MORE-THAN-ONE%
> ?GENERIC?     $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- 
> %COMPILE%
> ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
>@@ -30,3 +31,10 @@ else !%?MORE-THAN-ONE%
>       sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|%OBJ%|' $(LEX_OUTPUT_ROOT).c >%OBJ%
>       rm -f $(LEX_OUTPUT_ROOT).c
> endif !%?MORE-THAN-ONE%
>+?MAINTAINER-MODE?else !MAINTAINER_MODE
>+?MAINTAINER-MODE?     @# Skip this target when not in maintainer mode (see 
>the help on the
>+?MAINTAINER-MODE?     @# `--enable-maintainer-mode' option to the `configure' 
>script).
>+?MAINTAINER-MODE?     @# Otherwise, the implicit build rules for .l.c built 
>into make could
>+?MAINTAINER-MODE?     @# be executed for this target.
>+?MAINTAINER-MODE?     @:
>+?MAINTAINER-MODE?endif !MAINTAINER_MODE
>Index: lib/am/yacc.am
>===================================================================
>RCS file: /cvs/automake/automake/lib/am/yacc.am,v
>retrieving revision 1.16
>diff -u -p -r1.16 yacc.am
>--- lib/am/yacc.am     18 Apr 2003 08:54:34 -0000      1.16
>+++ lib/am/yacc.am     23 Jul 2004 00:26:26 -0000
>@@ -18,6 +18,7 @@
> 
> ?GENERIC?%EXT%%DERIVED-EXT%:
> ?!GENERIC?%OBJ%: %SOURCE%
>+?MAINTAINER-MODE?if MAINTAINER_MODE
> if %?MORE-THAN-ONE%
> ?GENERIC?     $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h 
> y.output %BASE%.output -- %COMPILE%
> ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
>@@ -48,3 +49,10 @@ else !%?MORE-THAN-ONE%
>       sed '/^#/ s|y\.tab\.c|%OBJ%|' y.tab.c >%OBJ%t && mv %OBJ%t %OBJ%
>       rm -f y.tab.c
> endif !%?MORE-THAN-ONE%
>+?MAINTAINER-MODE?else !MAINTAINER_MODE
>+?MAINTAINER-MODE?     @# Skip this target when not in maintainer mode (see 
>the help on the
>+?MAINTAINER-MODE?     @# `--enable-maintainer-mode' option to the `configure' 
>script).
>+?MAINTAINER-MODE?     @# Otherwise, the implicit build rules for .y.c built 
>into make could
>+?MAINTAINER-MODE?     @# be executed for this target.
>+?MAINTAINER-MODE?     @:
>+?MAINTAINER-MODE?endif !MAINTAINER_MODE
>Index: tests/mmode-lexyacc.test
>===================================================================
>RCS file: tests/mmode-lexyacc.test
>diff -N tests/mmode-lexyacc.test
>--- /dev/null  1 Jan 1970 00:00:00 -0000
>+++ tests/mmode-lexyacc.test   23 Jul 2004 00:26:27 -0000
>@@ -0,0 +1,67 @@
>+#! /bin/sh
>+# Copyright (C) 1996, 2001, 2002  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.
>+
>+# Contributed by Derek R. Price <address@hidden>
>+
>+# Test to verify that intermediate files are only built from Yacc and Lex
>+# sources in maintainer mode.
>+
>+. ./defs || exit 1
>+
>+cat >> configure.in << 'END'
>+AM_MAINTAINER_MODE
>+AC_PROG_CC
>+AM_PROG_LEX
>+AC_PROG_YACC
>+AC_OUTPUT
>+END
>+
>+cat > Makefile.am <<'END'
>+bin_PROGRAMS = zardoz
>+zardoz_SOURCES = zardoz.y joe.l
>+LDADD = @LEXLIB@
>+END
>+
>+# The point of this test is that it is not dependant on a working lex or yacc.
>+cat > joe.c <<EOF
>+int joe (int arg)
>+{
>+    return arg * 2;
>+}
>+EOF
>+cat > zardoz.c <<EOF
>+int joe (int arg);
>+int main (int argc, char **argv)
>+{
>+    exit (joe (argc));
>+}
>+EOF
>+
>+# Ensure a later timestamp for our Lex & Yacc sources.
>+sleep 1
>+: > joe.l
>+: > zardoz.y
>+
>+$ACLOCAL || exit 1
>+$AUTOCONF || exit 1
>+$AUTOMAKE || exit 1
>+
>+./configure
>+$MAKE YACC=false LEX=false
>


Alexandre Duret-Lutz wrote:

>There are some not-so-serious problems which I mention only so
>you can avoid them in the future:
>


Thanks for the pointers!

Derek

-- 
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!





reply via email to

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