forked from Ivasoft/openwrt
build: add option to warn on recursive dependency
This addes the option to treat recursive dependencies as warnings instead of errors, by running make with WARN_RECURSIVE_DEP=1. Note that the script/config targets will not get rebuilt when you add or remove WARN_RECURSIVE_DEP while running make. One must run 'make config-clean' before building config with a different setting. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
committed by
Petr Štetiar
parent
dcf3e63a35
commit
3204430e38
@@ -16,6 +16,10 @@ OpenWrt Buildroot:
|
||||
- reverted an upstream change that avoids writing symbols that are not
|
||||
visible to .config, which breaks OpenWrt busybox's '.config' generation
|
||||
logic.
|
||||
- add a compilation option (-DWARN_RECURSIVE_DEP) to treat recursive deps
|
||||
as a warning, avoiding a complete build failure because of unrelated or
|
||||
minor recursive deps, or making a scrict check before commiting a change
|
||||
that may cause one.
|
||||
- use pre-built *.lex.c *.tab.[ch] files by default, to avoid depending on
|
||||
flex & bison. Rebuild/remove these files only if running make with
|
||||
BUILD_SHIPPED_FILES defined
|
||||
|
||||
@@ -1250,6 +1250,11 @@ struct symbol *sym_check_deps(struct symbol *sym)
|
||||
sym->flags &= ~SYMBOL_CHECK;
|
||||
}
|
||||
|
||||
#ifdef WARN_RECURSIVE_DEP
|
||||
if (sym2 && sym2 == sym)
|
||||
sym2 = NULL;
|
||||
#endif
|
||||
|
||||
return sym2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user