summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/buildhlp.mk16
1 files changed, 7 insertions, 9 deletions
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index ed5c4b88c..bf3418b7c 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -1,6 +1,9 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+shellescape='$(subst ','\'',$(1))'
+shellexport=$(1)=$(call shellescape,${$(1)})
+
ifneq ($(strip ${PKG_SITES}),)
ifeq ($(strip ${DISTFILES}),)
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
@@ -105,14 +108,9 @@ endif
mv $$i.bak $$i; \
fi;\
done
- @toedit=$$(WRKDIST='${WRKDIST}' CURDIR=$$(pwd) \
- PATCH_LIST='patch-* *.patch' WRKDIR1='${WRKDIR}' \
- ${BASH} ${TOPDIR}/scripts/update-patches); \
- if [[ -n $$toedit && $$toedit != FAIL ]]; then \
- echo -n 'edit patches: '; read i; \
- cd patches && $${VISUAL:-$${EDITOR:-vi}} $$toedit; \
- fi; \
- rm -rf ${WRKDIR}.orig; \
- [[ $$toedit != FAIL ]]
+ @WRKDIST=$(call shellescape,${WRKDIST}) \
+ WRKDIR1=$(call shellescape,${WRKDIR}) \
+ PATH=$(call shellescape,${HOST_PATH}) \
+ mksh ${TOPDIR}/scripts/update-patches2
.PHONY: update-patches host-update-patches