Re: [RFA] New substitute-path commands

Daniel Jacobowitz
2006-07-11T22:50:26Z

On Tue, Jul 11, 2006 at 03:25:24PM -0700, Joel Brobecker wrote:
>
> > 2. Should the end of the rule be anchored to end of string or
> > directory separator?
>
> I was thinking about this, and almost ready to implement it. But
> then I thought about the Windows case. On cygwin, the directory
> separator is '/', but then some tools probably use '\' and we
> accept it. On MinGW, the standard directory separator is '\', but
> GCC at least uses forward slashes as far as I know.
>
> So, in implementation terms, anchoring against the directory
> separator is tricky on Windows. I think we should accept both.
> I'm just not sure what is the best way of implementing this.
> Looks like we might not be able to avoid an #ifdef macro.

Isn't this just IS_DIR_SEPARATOR ? You probably want to use
FILENAME_CMP too.

The other question is what to do with "C:" on cygwin/mingw32.
I haven't thought about that. I'd feel free to not worry about it, and
then if it becomes a problem for someone using Windows they can fix
it (which might be me, later - I expect CodeSourcery to want to do the
same thing Andrew Stubbs was talking about and set this up to work
magically).

--
Daniel Jacobowitz
CodeSourcery