[v2,1/8] Fix latent yacc-related bug in gdb/Makefile.in init.c rule

Message ID 1461789279-15996-2-git-send-email-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey April 27, 2016, 8:34 p.m. UTC
  gdb's Makefile.in does not currently scan .y files to add global
initializers from these files to init.c.  However, at least ada-exp.y
tries to use this feature.

This patch fixes the problem.

2016-04-26  Tom Tromey  <tom@tromey.com>

	* Makefile.in (init.c): Search .y files for initialization
	functions.
---
 gdb/ChangeLog   | 5 +++++
 gdb/Makefile.in | 1 +
 2 files changed, 6 insertions(+)
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1335563..dd6869d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@ 
+2016-04-26  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (init.c): Search .y files for initialization
+	functions.
+
 2016-04-26  Sanimir Agovic  <sanimir.agovic@intel.com>
 	    Keven Boell  <keven.boell@intel.com>
 	    Bernhard Heckel  <bernhard.heckel@intel.com>
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 2af78a5..400d2b0 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1360,6 +1360,7 @@  init.c: $(INIT_FILES)
 	    -e '/version.[co]$$/d' \
 	    -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \
 	    -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \
+	    -e 's/-exp\.o$$/-exp.y/' \
 	    -e 's/\.[co]$$/.c/' \
 	    -e 's,signals\.c,common/signals\.c,' \
 	    -e 's|^\([^  /][^     ]*\)|$(srcdir)/\1|g' | \