Subject: Re: Strange behaviour of vpath with dos paths
From: "Johan Bezem" <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 12 Mar 2002 20:04:04 +0100
Newsgroups: csk.development

Soren Andersen wrote:
> 
> On 28 Feb 2002 at 11:24, Colm Aengus Murphy wrote:
> 
> > Hi Johan,
> >
> > I took a quick look at source code for make 3.79.1-5.
> >
> > It looks to me like vpath.c (build_vpath_lists) does conversion of Win32
> > paths to posix ones for the VPATH variable but not for vpath. Not being a
> > software programmer I'm not in a position to provide a patch, but maybe
> > someone else could ?
> >
> > Colm A
> 
> I am not a software programmer either ;-)  (irregardless of the apparent assumptions made
> about me in the past on this List) -- at least not really a "C" programmer (rather, japh-er) but
> I will take a look at this and see if I can fix it. Mind you, I wouldn't hold my breath or base
> my plans for a major product roll-out on my quick success; I have not yet ever tried to build
> `make' from source, so that's the first and possibly not trivial hurdle. Maybe somebody else
> will therefore get there before me, but I thought I'd offer you assurance now that at least
> one pair of eyeballs out here will be looking into this.
> 
>     Luck,
>      Soren Andersen

OK, here's some help. I suppose I dare call myself a programmer :), even
though I haven't tried creating make from it's sources...

In vpath.c lines 103-112 the CygWin specific path conversion is taken
care of in the VPATH variable case.
In the GPATH variable case (line 138-154), it looks like GPATH is not
converted either. This would need some testing, but I suppose GPATH is
hardly a regularly used feature...
Copying lines 101-114 after line 146 should take care of that omission;
the variable 'posixp' has been defines and used previously, but should
still be in scope (lines 64-66), so it may be doubly used (unclean, but
workable).
The vpath directive is processed somwhere else. The only occurrence of
the function 'construct_vpath_list' outside of vpath.c (and make.h for a
prototype) is read.c
In read.c lines 637-656, the directive is processed. And, alas, no
CygWin processing of DOS-like paths there.
Copying the same lines from vpath.c into read.c after line 652 might be
all that's needed, but without actually doing the work+test, it's hard
to tell whether everything is in scope. Be sure to define a variable
'posixp' in this case, however.
If I find a few free minutes, I'll continue from here, but maybe this is
enough input for you already.

HTH,

Johan

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/