From: Zooko O'Whielacronx Date: Wed, 6 Aug 2008 23:11:43 +0000 (-0700) Subject: setup: escape any double-quote chars in the PATH before using the PATH to find and... X-Git-Url: https://git.rkrishnan.org/uri/%3C?a=commitdiff_plain;h=960a648d5bc3b7201aa9d734bc231a387aea948c;p=tahoe-lafs%2Ftahoe-lafs.git setup: escape any double-quote chars in the PATH before using the PATH to find and invoke trial --- diff --git a/Makefile b/Makefile index 78d7e902..a8a076be 100644 --- 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)