build: add option to warn on recursive dependency
[openwrt/.git] / include / toplevel.mk
index 2965f75c7cd7e66fef5b7562a77f134ff6ddb18f..def80503dd911d209d55bfa7a79fc3dd83f79d1c 100644 (file)
@@ -102,7 +102,7 @@ prepare-tmpinfo: FORCE
 ifneq ($(DISTRO_PKG_CONFIG),)
 scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
 endif
-scripts/config/%onf: CFLAGS+= -O2
+scripts/config/%onf: CFLAGS+= -O2 $(if $(WARN_RECURSIVE_DEP),-DWARN_RECURSIVE_DEP)
 scripts/config/%onf:
        @$(_SINGLE)$(SUBMAKE) -s -C scripts/config $(notdir $@) CC="$(HOSTCC_WRAPPER)"