From: Tom Tromey Date: Wed, 10 Apr 2024 20:54:17 +0000 (-0600) Subject: Allow initialization functions in .y files X-Git-Tag: gdb-15-branchpoint~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1587e198f3a6c7b08c44b3ea643087de8ea25c5;p=thirdparty%2Fbinutils-gdb.git 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. --- 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