Browse Source

proper quoting in GNUmakefile as well

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 10 năm trước cách đây
mục cha
commit
0bb1dee845
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      mk/buildhlp.mk

+ 7 - 2
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