summaryrefslogtreecommitdiffstats
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
commit3a0dd126b7f760858051d24970f5c93f6aed965e (patch)
tree3f49f586fa5e7ffc5e3569c5d68108acb6bef859
parent9cba7b7837361c028935aec2613dc4b4ef0526ec (diff)
downloadtxr-3a0dd126b7f760858051d24970f5c93f6aed965e.tar.gz
txr-3a0dd126b7f760858051d24970f5c93f6aed965e.tar.bz2
txr-3a0dd126b7f760858051d24970f5c93f6aed965e.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.
-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; \