mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
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.
This commit is contained 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user