[devtools,07/13] Makefile: m4_changequote([[[, ]]]) to avoid accidental quoting.

Message ID 20170505224110.28990-8-lukeshu@parabola.nu
State Accepted
Headers show
Series More patches from Parabola's new version | expand

Commit Message

Luke Shumaker May 5, 2017, 10:41 p.m. UTC
The default m4 quote characters: `QUOTE' are troublesome, because ` is
fairly likely to pop up in a shell script (if not for a subshell, because
it is a useful character in comments and user-facing messages).

So, this changes it to [[[QUOTE]]], as it is unlikely to see three braces
together like that, let alone in unbalanced sets.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/Makefile b/Makefile
index f4a00ba..d5f6ad7 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@  edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
 %: %.in Makefile lib/common.sh
 	@echo "GEN $@"
 	@$(RM) "$@"
-	@m4 -P $@.in | $(edit) >$@
+	@{ echo -n 'm4_changequote([[[,]]])'; cat $@.in; } | m4 -P | $(edit) >$@
 	@chmod a-w "$@"
 	@chmod +x "$@"
 	@bash -O extglob -n "$@"