[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make help on patsubst
From: |
Paul D. Smith |
Subject: |
Re: GNU make help on patsubst |
Date: |
Tue, 7 Aug 2001 14:35:46 -0400 |
%% "Li, Jerry" <address@hidden> writes:
lj> Is there any way to replace / with \ in D:/myWorkingDir/src/test
lj> on Windows NT?
lj> I have tried $(patsubst /,\, D:/myWorkingDir/src/test), but it does not
lj> work.
You have to hide the backslash from make. Put it into a variable; that
in itself is tricky:
BSLASH := \\#
then you can use:
$(patsubst /,$(BSLASH),D:/myWorkingDir/src/test)
Note that you will not, in general, be able to use the backslash value
as either a target or a prerequisite, but you can translate them when
necessary in the command scripts. It shouldn't _usually_ be necessary,
as most Windows tools will handle forward slashes equally well. It's
only command.com based tools that won't, IIRC.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist