From d1587e198f3a6c7b08c44b3ea643087de8ea25c5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 10 Apr 2024 14:54:17 -0600 Subject: [PATCH] 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. --- gdb/Makefile.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 265c086725d..84bc54b303e 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