Makefile: drop config cache on .config changes
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 11 Dec 2009 23:16:33 +0000 (00:16 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 11 Dec 2009 23:16:33 +0000 (00:16 +0100)
The config cache might contain invalid values when .config is changed
(E.G. when adding/removing libraries), so drop it so config checks are
rerun for new packages (existing package still won't be rebuilt).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile

index 904121e2e4c2ea335587850a917b44a5b958ae6a..f8303e137636a5683e17c0856dae72d8644b4e88 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -440,6 +440,14 @@ external-deps:
        @$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
                SPIDER=--spider source
 
+ifeq ($(BR2_CONFIG_CACHE),y)
+$(BUILD_DIR)/tgt-config.cache: .config
+       rm -f $@
+       touch $@
+
+$(BASE_TARGETS): | $(BUILD_DIR)/tgt-config.cache
+endif
+
 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
 all: menuconfig