summaryrefslogtreecommitdiff
path: root/mk/buildhlp.mk
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2014-05-03 11:31:56 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-03 14:33:12 +0200
commit0bb1dee8453d8d723263fe63c38781faf6cb2bc6 (patch)
tree6c92960b166f41e557618d667fff722434d9c3c4 /mk/buildhlp.mk
parent166aa788c57b5f842f89787b7d22dc47bc746602 (diff)
proper quoting in GNUmakefile as well
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'mk/buildhlp.mk')
-rw-r--r--mk/buildhlp.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index 3262a25cb..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,7 +108,9 @@ endif
mv $$i.bak $$i; \
fi;\
done
- @WRKDIST='${WRKDIST}' WRKDIR1='${WRKDIR}' \
- PATH='${HOST_PATH}' mksh ${TOPDIR}/scripts/update-patches2
+ @WRKDIST=$(call shellescape,${WRKDIST}) \
+ WRKDIR1=$(call shellescape,${WRKDIR}) \
+ PATH=$(call shellescape,${HOST_PATH}) \
+ mksh ${TOPDIR}/scripts/update-patches2
.PHONY: update-patches host-update-patches