build: move tmp/.prereq-build to staging_dir/host to gracefully handle staging_dir deletion

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44551
master
Felix Fietkau 10 years ago
parent 03db988eaa
commit 379dc5c11f
  1. 8
      include/toplevel.mk

@ -53,7 +53,7 @@ else
endif
ifeq ($(FORCE),)
.config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
.config scripts/config/conf scripts/config/mconf: staging_dir/host/.prereq-build
endif
SCAN_COOKIE?=$(shell echo $$$$)
@ -66,7 +66,7 @@ ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024
prepare-mk: FORCE ;
prepare-tmpinfo: FORCE
@+$(MAKE) -r -s tmp/.prereq-build $(PREP_MK)
@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK)
mkdir -p tmp/info
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(TOPDIR)/include/package*.mk $(TOPDIR)/overlay/*/*.mk" SCAN_DEPTH=5 SCAN_EXTRA=""
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
@ -136,7 +136,7 @@ kernel_menuconfig: prepare_kernel_conf
kernel_nconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux nconfig
tmp/.prereq-build: include/prereq-build.mk
staging_dir/host/.prereq-build: include/prereq-build.mk
mkdir -p tmp
rm -f tmp/.host.mk
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
@ -202,7 +202,7 @@ distclean:
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
ifeq ($(findstring v,$(DEBUG)),)
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig tmp/.prereq-build tmp/.prereq-package prepare-tmpinfo
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig staging_dir/host/.prereq-build tmp/.prereq-package prepare-tmpinfo
endif
.PHONY: help FORCE
.NOTPARALLEL:

Loading…
Cancel
Save