improve mtd image check - don't check trx header if the target partition is not ...
[openwrt-10.03/.git] / include / kernel.mk
index af5d9455fa316be99cd80a92e7ae1a6f2ec76cb9..1ab85d4cc58a708be42c5c81363beef5b4e43826 100644 (file)
@@ -19,10 +19,12 @@ else
      LINUX_RELEASE:=$(CONFIG_LINUX_RELEASE)
      LINUX_KARCH:=$(CONFIG_LINUX_KARCH)
   else
-  # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces)
-    $(warning rebuilding .kernel.mk)
-    $(TOPDIR)/.kernel.mk: FORCE
-       @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null
+    ifneq ($(KERNEL_BUILD),1)
+      # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces)
+      $(warning rebuilding .kernel.mk)
+      $(TOPDIR)/.kernel.mk: FORCE
+               @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null
+    endif
   endif
 
   ifeq ($(KERNEL),2.6)