kernel: backport mtd partition address fix sent upstream
[openwrt/staging/chunkeey.git] / include / toplevel.mk
index b57dcd8544f603e360336b84e5eb5187bff9a6ff..2b3b55db9f75d79b4400a5ee2a90718a3d48fd2f 100644 (file)
@@ -88,9 +88,9 @@ prepare-tmpinfo: FORCE
                f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
                [ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
        done
-       [ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
+       [ tmp/.config-feeds.in -nt tmp/.packageauxvars ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
        ./scripts/package-metadata.pl mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
-       ./scripts/package-metadata.pl subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
+       ./scripts/package-metadata.pl pkgaux tmp/.packageinfo > tmp/.packageauxvars || { rm -f tmp/.packageauxvars; false; }
        touch $(TOPDIR)/tmp/.build
 
 .config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo)
@@ -99,13 +99,18 @@ prepare-tmpinfo: FORCE
                $(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
        fi
 
+ifneq ($(DISTRO_PKG_CONFIG),)
+scripts/config/mconf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+endif
 scripts/config/mconf:
        @$(_SINGLE)$(SUBMAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
 
 $(eval $(call rdep,scripts/config,scripts/config/mconf))
 
 scripts/config/qconf:
-       @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
+       @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf \
+               CC="$(HOSTCC_WRAPPER)" \
+               DISTRO-PKG-CONFIG="$(DISTRO_PKG_CONFIG)"
 
 scripts/config/conf:
        @$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
@@ -145,7 +150,7 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE
        fi
        $< Config.in
 
-prepare_kernel_conf: .config FORCE
+prepare_kernel_conf: .config toolchain/install FORCE
 
 ifeq ($(wildcard staging_dir/host/bin/quilt),)
   prepare_kernel_conf:
@@ -157,6 +162,10 @@ endif
 kernel_oldconfig: prepare_kernel_conf
        $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
 
+ifneq ($(DISTRO_PKG_CONFIG),)
+kernel_menuconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+kernel_nconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+endif
 kernel_menuconfig: prepare_kernel_conf
        $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig