mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-26 23:36:17 -04:00
Makefile: fix infinite recursion by dropping non-existent %.output
Without the change GNU `make-4.4` falls into infinite recursion of trying
to generate %.output files (bison is not passed flags to generate debug
output).
This happens on GNU `make-4.4` only after GNU make change to more eagerly
rebuild all target outputs in multiple targets:
https://savannah.gnu.org/bugs/index.php?63098
The recursion here is the following:
- Makefile depends on *.d files
- *.d files depend on *.c files
- *.c files are generated by bison
- bison is triggered whenever some of it's multiple targets are missing
In our case `%.output` is always missing and bison is always reran.
*.d files are always regenerated on `make` run. And make is always
restarted as *.d files are always regenerated.
The fix removes infeasible `%.output`.
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Message-Id: <20220925104203.648449-2-slyich@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
a036cc7b0c
commit
98a07006c4
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -384,7 +384,7 @@ clean: libfdt_clean pylibfdt_clean tests_clean
|
||||||
@$(VECHO) LEX $@
|
@$(VECHO) LEX $@
|
||||||
$(LEX) -o$@ $<
|
$(LEX) -o$@ $<
|
||||||
|
|
||||||
%.tab.c %.tab.h %.output: %.y
|
%.tab.c %.tab.h: %.y
|
||||||
@$(VECHO) BISON $@
|
@$(VECHO) BISON $@
|
||||||
$(BISON) -b $(basename $(basename $@)) -d $<
|
$(BISON) -b $(basename $(basename $@)) -d $<
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue