summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.once.head/00-quote.mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-06 14:42:55 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-06 14:42:55 -0400
commit2728d489673f1d97a43e4f8d888b3591c233cfb7 (patch)
tree3d088db75877494a3a23db2b78c62209e17ee061 /build-aux/Makefile.once.head/00-quote.mk
parentf97cfec567d54e883e1b868714b6beee5420ba2d (diff)
(systemd) build-aux: gitfiles
Diffstat (limited to 'build-aux/Makefile.once.head/00-quote.mk')
-rw-r--r--build-aux/Makefile.once.head/00-quote.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk
index 23be614..17f6307 100644
--- a/build-aux/Makefile.once.head/00-quote.mk
+++ b/build-aux/Makefile.once.head/00-quote.mk
@@ -15,7 +15,13 @@
mod.quote.description = Macros to quote tricky strings
-quote.pattern = $(subst %,\%,$(subst \,\\,$1))
+_quote.backslash = $(if $1,$(call _quote.backslash,$(wordlist 2,$(words $1),$1),$(subst $(firstword $1),\$(firstword $1),$2)),$2)
+
+quote.var = $(subst $(at.nl),\$(at.nl),$(subst $$,$$$$,$1))
+quote.pattern = $(call _quote.backslash, \ % ,$1)
+quote.ere = $(call _quote.backslash, \ ^ . [ $$ ( ) | * + ? { ,$1)
+quote.bre = $(call _quote.backslash, \ ^ . [ $$ * ,$1)
+
quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_mod.tmp)))
# I put this as the last line in the file because it confuses Emacs syntax