This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

yacc and lex reruns without maintainer-mode (was: [PATCH 4/N] The big bump)


[ trimming Cc: ]

Hello Andreas,

thanks for the feedback.

* Andreas Schwab wrote on Sun, Aug 23, 2009 at 01:31:09PM CEST:
> Ralf Wildenhues writes:
> 
> > ld/ChangeLog:
> > 2009-08-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
> >
> > 	* Makefile.in: Regenerate.
> > 	* aclocal.m4
> > 	* config.in: Likewise.
> > 	* configure: Likewise.
> 
> This has broken the .l.c and .y.c rules.  Once the targets are generated
> they are never updated again even if out of date.

Most likely that was broken due to this change in Automake 1.10+
(quoting NEWS):

|    When `AM_MAINTAINER_MODE' (*note maintainer-mode::) is used, the
| rebuild rule for distributed Yacc and Lex sources are only used when
| `maintainer-mode' is enabled, or when the files have been erased.

This comment in automake/lib/am/yacc.am describes in more detail the
semantics:

## We want to disable the Yacc rebuild rule when
##   1. AM_MAINTAINER_MODE is used, and
##   2. --enable-maintainer-mode is not specified, and
##   3. parser.c already exist, and
##   4. parser.y and parser.c are distributed.


I assume that the old semantics of unconditionally rebuilding them if
their inputs have changed is desirable in binutils?

The patch below should reenable them.  Rather than playing with nodist_
prefixes (that would be hard to understand and could easily be forgotten
with the addition of a new lex or yacc file, given that binutils doesn't
use the dist rules from Automake) let's just turn off the semantics
overriding the skip variables.

OK to apply?

Please note that there is another fix to ld/ pending review:
<http://sourceware.org/ml/binutils/2009-08/msg00410.html>.

AFAICS there is no instance of this issue in the GCC tree or elsewhere
in binutils or gdb.

Thanks,
Ralf

gas/ChangeLog:
2009-08-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

ld/ChangeLog:
2009-08-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

binutils/ChangeLog:
2009-08-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

gold/ChangeLog:
2009-08-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

Index: binutils/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.115
diff -u -r1.115 Makefile.am
--- binutils/Makefile.am	23 Aug 2009 10:28:49 -0000	1.115
+++ binutils/Makefile.am	23 Aug 2009 12:07:26 -0000
@@ -17,6 +17,11 @@
 YFLAGS = -d
 LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 
+# Automake 1.10+ disables lex and yacc output file regeneration if
+# maintainer mode is disabled.  Avoid this.
+am__skiplex =
+am__skipyacc =
+
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS)
Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.179
diff -u -r1.179 Makefile.am
--- gas/Makefile.am	22 Aug 2009 19:02:56 -0000	1.179
+++ gas/Makefile.am	23 Aug 2009 12:07:28 -0000
@@ -10,6 +10,11 @@
 YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
 
+# Automake 1.10+ disables lex and yacc output file regeneration if
+# maintainer mode is disabled.  Avoid this.
+am__skiplex =
+am__skipyacc =
+
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS)
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.271
diff -u -r1.271 Makefile.am
--- ld/Makefile.am	22 Aug 2009 19:02:57 -0000	1.271
+++ ld/Makefile.am	23 Aug 2009 12:07:48 -0000
@@ -12,6 +12,11 @@
 YFLAGS = -d
 LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
 
+# Automake 1.10+ disables lex and yacc output file regeneration if
+# maintainer mode is disabled.  Avoid this.
+am__skiplex =
+am__skipyacc =
+
 WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS)
Index: gold/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/Makefile.am,v
retrieving revision 1.52
diff -u -r1.52 Makefile.am
--- gold/Makefile.am	22 Aug 2009 19:02:56 -0000	1.52
+++ gold/Makefile.am	23 Aug 2009 12:15:57 -0000
@@ -29,6 +29,11 @@
 
 AM_YFLAGS = -d
 
+# Automake 1.10+ disables lex and yacc output file regeneration if
+# maintainer mode is disabled.  Avoid this.
+am__skiplex =
+am__skipyacc =
+
 noinst_PROGRAMS = ld-new
 noinst_LIBRARIES = libgold.a
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]