浏览代码

Makefile: fix make <blah>_defconfig

Make sure we only pass O=<path> if we were originally called like that,
otherwise we might end up looking for the .config in the wrong place.

Likewise, when changing between using O= or not (or simply running
make <blah>_defconfig in a pristine source tree), we do end up having
a .config, but no .config.cmd. It isn't really critical so just continue
even if we couldn't read it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Peter Korsgaard 15 年之前
父节点
当前提交
2691d80803
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Makefile

+ 5 - 1
Makefile

@@ -287,7 +287,7 @@ include package/Makefile.in
 all: world
 
 # In this section, we need .config
-include $(CONFIG_DIR)/.config.cmd
+-include $(CONFIG_DIR)/.config.cmd
 
 # We also need the various per-package makefiles, which also add
 # each selected package to TARGETS if that package was selected
@@ -587,7 +587,11 @@ flush:
 
 %_defconfig: $(TOPDIR)/configs/%_defconfig
 	cp $^ $(CONFIG_DIR)/.config
+ifeq ($(O),output)
+	@$(MAKE) oldconfig
+else
 	@$(MAKE) O=$(O) oldconfig
+endif
 
 configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config