aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-04-10 14:54:17 -0600
committerTom Tromey <tom@tromey.com>2024-05-14 13:28:39 -0600
commitd1587e198f3a6c7b08c44b3ea643087de8ea25c5 (patch)
tree2659601e893fbc40c84fe5333a72064c2d9a38cf /gdb
parent6bc4d69d3d76dceab9681578d9e5f99175ee0c39 (diff)
downloadgdb-d1587e198f3a6c7b08c44b3ea643087de8ea25c5.zip
gdb-d1587e198f3a6c7b08c44b3ea643087de8ea25c5.tar.gz
gdb-d1587e198f3a6c7b08c44b3ea643087de8ea25c5.tar.bz2
Allow initialization functions in .y files
If you add an initialization function to a .y file, it will not show up in init.c, because if the yacc output is in the build tree, it won't be found. This patch changes the Makefile to be more robust in this situation.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/Makefile.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 265c086..84bc54b 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2177,7 +2177,9 @@ INIT_FILES = \
init.c: stamp-init; @true
stamp-init: $(INIT_FILES) config.status $(srcdir)/make-init-c
$(ECHO_INIT_C)
- $(SILENCE) $(srcdir)/make-init-c $(addprefix $(srcdir)/,$(INIT_FILES)) > init.c-tmp
+ $(SILENCE) $(srcdir)/make-init-c \
+ $(filter-out config.status $(srcdir)/make-init-c,$^) \
+ > init.c-tmp
$(SILENCE) $(SHELL) $(srcdir)/../move-if-change init.c-tmp init.c
$(SILENCE) echo stamp > stamp-init