]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Allow initialization functions in .y files
authorTom Tromey <tom@tromey.com>
Wed, 10 Apr 2024 20:54:17 +0000 (14:54 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 14 May 2024 19:28:39 +0000 (13:28 -0600)
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

index 265c086725da4d5b5625e7f4a31b5e071259de24..84bc54b303e183a6b273b496921b34c80d093205 100644 (file)
@@ -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