summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-04-16 12:42:54 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-04-16 12:42:55 -0700
commitfa0ba729dc5e0af0b0165e4e12904bfa3f39f9db (patch)
treedc71f101ad7740d4f65a1db19270fbc97b9cad64 /Makefile
parentMerge branch 'wk/gitweb-snapshot-use-if-modified-since' (diff)
parentUse SHELL_PATH from build system in run_command.c:prepare_shell_cmd (diff)
downloadtgif-fa0ba729dc5e0af0b0165e4e12904bfa3f39f9db.tar.xz
Merge branch 'bw/spawn-via-shell-path'
"sh" on the user's PATH may be utterly broken on some systems; consistently use SHELL_PATH even from inside run-command API. By Ben Walton * bw/spawn-via-shell-path: Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index be1957a5e9..abee43e264 100644
--- a/Makefile
+++ b/Makefile
@@ -1849,6 +1849,13 @@ DEFAULT_PAGER_CQ_SQ = $(subst ','\'',$(DEFAULT_PAGER_CQ))
BASIC_CFLAGS += -DDEFAULT_PAGER='$(DEFAULT_PAGER_CQ_SQ)'
endif
+ifdef SHELL_PATH
+SHELL_PATH_CQ = "$(subst ",\",$(subst \,\\,$(SHELL_PATH)))"
+SHELL_PATH_CQ_SQ = $(subst ','\'',$(SHELL_PATH_CQ))
+
+BASIC_CFLAGS += -DSHELL_PATH='$(SHELL_PATH_CQ_SQ)'
+endif
+
ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS)