summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-16 06:36:58 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-16 06:36:58 -0700
commitd8d52dfd3e7f2eb73667eaad81a8030fa6e7df76 (patch)
tree3f49f586fa5e7ffc5e3569c5d68108acb6bef859 /Makefile
parent67653e3e713a76eeb866e99543060cf5d65471a9 (diff)
downloadtxr-d8d52dfd3e7f2eb73667eaad81a8030fa6e7df76.tar.gz
txr-d8d52dfd3e7f2eb73667eaad81a8030fa6e7df76.tar.bz2
txr-d8d52dfd3e7f2eb73667eaad81a8030fa6e7df76.zip
Makefile: bugfix: shell quoting issue in macro.
* Makefile (SH): The $(1) macro argument is substituted into a shell '...' quote. It may contain single quotes itself, so these have to be mapped to the famous '\'' sequence. Currently, only one SH call has '...' syntax in it: one in the y.tab.c rule which calls sed -e '/yyparse/d'. That works anyway, and the quotes could be removed from it; but let's fix the SH macro.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b8cc40fb..108cdcc6 100644
--- a/Makefile
+++ b/Makefile
@@ -114,7 +114,7 @@ endef
define SH
$(if $(VERBOSE), \
$(1), \
- $(V)cmd='$(1)' ; \
+ $(V)cmd='$(subst ','\'',$(1))' ; \
if ! eval "$$cmd" ; then \
printf "make: failing command:\n%s\n" "$$cmd"; \
exit 1; \