From 5be21ca7304e7ecb52382674d08418b7b7544b26 Mon Sep 17 00:00:00 2001 From: Jonathan Conder Date: Sat, 18 Mar 2023 08:59:56 +1300 Subject: [PATCH] Avoid overriding WORK_DIR for toolchain --- mk/spksrc.spk.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index 5dd6640276f..929dde3a559 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -584,17 +584,15 @@ kernel-modules-%: $(MSG) ARCH to be processed: $${archs2process} ; \ for arch in $${archs2process} ; do \ $(MSG) "Processing $${arch} ARCH" ; \ - MAKEFLAGS= $(PSTAT_TIME) $(MAKE) WORK_DIR=$(PWD)/work-$* ARCH=$$(echo $${arch} | cut -f1 -d-) TCVERSION=$$(echo $${arch} | cut -f2 -d-) strip 2>&1 | tee --append build-$*.log ; \ - [ $${PIPESTATUS[0]} -eq 0 ] || false ; \ + MAKEFLAGS= $(PSTAT_TIME) $(MAKE) ARCH=$$(echo $${arch} | cut -f1 -d-) TCVERSION=$$(echo $${arch} | cut -f2 -d-) strip 2>&1 | tee --append build-$*.log ; \ + [ $${PIPESTATUS[0]} -eq 0 ] ; \ $(MAKE) spkclean ; \ - rm -fr $(PWD)/work-$*/$(addprefix linux-, $${arch}) ; \ - $(MAKE) -C ../../toolchain/syno-$${arch} clean ; \ done arch-%: | pre-build-native ifneq ($(strip $(REQUIRE_KERNEL_MODULE)),) $(MAKE) $(addprefix kernel-modules-, $(or $(filter $(addprefix %, $(DEFAULT_TC)), $(filter %$(word 2,$(subst -, ,$*)), $(filter $(firstword $(subst -, ,$*))%, $(AVAILABLE_TOOLCHAINS)))),$*)) - $(MAKE) REQUIRE_KERNEL_MODULE= REQUIRE_KERNEL= WORK_DIR=$(PWD)/work-$* $(addprefix build-arch-, $*) + $(MAKE) REQUIRE_KERNEL_MODULE= REQUIRE_KERNEL= $(addprefix build-arch-, $(or $(filter $(addprefix %, $(DEFAULT_TC)), $(filter %$(word 2,$(subst -, ,$*)), $(filter $(firstword $(subst -, ,$*))%, $(AVAILABLE_TOOLCHAINS)))),$*)) else # handle and allow parallel build for: arch- | make arch--X.Y @$(MSG) BUILDING package for arch $(or $(filter $(addprefix %, $(DEFAULT_TC)), $(filter %$(word 2,$(subst -, ,$*)), $(filter $(firstword $(subst -, ,$*))%, $(AVAILABLE_TOOLCHAINS)))), $*)