mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-06 21:25:05 -05:00
Makefile: limit make re-execution to avoid infinite spin
make-4.4 became intentionally more eager at rebuilding outdated Makefile
includes. Currently this causes `dtc` to spin infinitely in
parser/dependency loop:
$ make
...
CHK version_gen.h
BISON dtc-parser.tab.h
DEP dtc-lexer.lex.c
DEP dtc-parser.tab.c
CHK version_gen.h
BISON dtc-parser.tab.h
DEP dtc-lexer.lex.c
DEP dtc-parser.tab.c
... # never stops
After the change build eventually fails when gets into this state:
$ make
...
CHK version_gen.h
UPD version_gen.h
DEP util.c
BISON dtc-parser.tab.h
DEP dtc-lexer.lex.c
DEP dtc-parser.tab.c
CHK version_gen.h
BISON dtc-parser.tab.h
DEP dtc-lexer.lex.c
DEP dtc-parser.tab.c
Makefile:394: *** "Make re-executed itself 10 times. Infinite recursion?". Stop.
The actual recursion will be fixed separately.
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Message-Id: <20220925104203.648449-1-slyich@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c6e92108bc
commit
a036cc7b0c
1 changed files with 4 additions and 0 deletions
4
Makefile
4
Makefile
|
|
@ -389,3 +389,7 @@ clean: libfdt_clean pylibfdt_clean tests_clean
|
|||
$(BISON) -b $(basename $(basename $@)) -d $<
|
||||
|
||||
FORCE:
|
||||
|
||||
ifeq ($(MAKE_RESTARTS),10)
|
||||
$(error "Make re-executed itself $(MAKE_RESTARTS) times. Infinite recursion?")
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue