]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: escape any double-quote chars in the PATH before using the PATH to find and...
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 6 Aug 2008 23:11:43 +0000 (16:11 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 6 Aug 2008 23:11:43 +0000 (16:11 -0700)
Makefile

index 78d7e902bb1843623b760bc682bf1cd384ba9f54..a8a076be05ee19d64b681d47725f29171d05f2f9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,17 @@ else
         PP=PYTHONPATH="$(SUPPORTLIB)"
 endif
 
+# Escape any quote chars in PATH.  Note that if they are already escaped then
+# the following subst will screw it up and weird parsing errors will
+# eventually result.
+PATH := $(subst ",\",${PATH})
+
+TRIALCMD = $(shell PATH="$(PATH):${PWD}/support/bin" $(PP) $(PYTHON) misc/find_trial.py)
+ifeq ($(TRIALCMD),)
+$(error Couldn't find trial.  It comes with twisted.)
+endif
+TRIAL=PATH="$(PATH):${PWD}/support/bin" PYTHONUNBUFFERED=1 $(TRIALCMD) --rterrors $(REACTOROPT)
+
 TRIALCMD = $(shell PATH="${PATH}:${PWD}/support/bin" $(PP) $(PYTHON) misc/find_trial.py)
 TRIAL=PATH="${PATH}:${PWD}/support/bin" PYTHONUNBUFFERED=1 $(TRIALCMD) --rterrors $(REACTOROPT) $(TRIALOPT)