[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spacing in environmental variable
From: |
Paul D. Smith |
Subject: |
Re: Spacing in environmental variable |
Date: |
Mon, 21 Jun 2004 00:37:02 -0400 |
%% address@hidden writes:
i> One possible workaround I was thinking about was to temporarily
i> replace the spaces with a different character, like
i> TEMPPATH:=$(subst ,*,$(PATH). That would replace all spaces with
i> "*" char. However, subst doesn't seem to like it if the from
i> string is a space.
This is not a problem: you just have to know the "trick". The trick is
to put the space into a variable, then use the variable in the subst
function, like this:
# Empty variable
E :=
# Variable containing one space
S := $E $E
...
TEMPPATH := $(subst $S,*,$(PATH))
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Re: Spacing in environmental variable,
Paul D. Smith <=