Re: Strange behaviour of vpath with dos paths

2002-03-22 Thread Johan Bezem

Christopher Faylor wrote:
SNIP
 So, my question: Where can I find the repository of the CygWin make
 package? Or otherwise, how to proceed from here?
 
 You can't.  Use the make source tarball and submit ChangeLog + patch
 here.

OK, here it goes. I'm not aware of standard testing procedures or
requirements for CygWin, so maybe someone could double-check. 

I used
  diff -up file.orig.c file.c  file.c-patch 21
for both vpath.c and read.c, files attached.

HTH,

Johan Bezem
CSK Software AG


dospathpatch.tar.bz2
Description: Binary data

--
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/


Re: Strange behaviour of vpath with dos paths

2002-03-22 Thread Christopher Faylor

On Fri, Mar 22, 2002 at 11:23:16AM +0100, Johan Bezem wrote:
Christopher Faylor wrote:
SNIP
 So, my question: Where can I find the repository of the CygWin make
 package? Or otherwise, how to proceed from here?
 
 You can't.  Use the make source tarball and submit ChangeLog + patch
 here.

OK, here it goes. I'm not aware of standard testing procedures or
requirements for CygWin, so maybe someone could double-check. 

I used
  diff -up file.orig.c file.c  file.c-patch 21
for both vpath.c and read.c, files attached.

You can use the standard procedures outlined at the contrib link
at http://cygwin.com./ .

That means you send the ChangeLog entry (not the diff of a ChangeLog
entry) and patch in clear text so that the barrier to inspecting your
work is minimal.  This is standard across every project that I am
aware of.

cgf

--
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/




Re: Strange behaviour of vpath with dos paths

2002-03-22 Thread Johan Bezem

Christopher Faylor wrote:
SNIP
 That means you send the ChangeLog entry (not the diff of a ChangeLog
 entry) and patch in clear text so that the barrier to inspecting your
 work is minimal.  This is standard across every project that I am
 aware of.

Sorry for the attachment then. Here it's once again.

Regards,

Johan Bezem
CSK Software AG

### ChangeLog ###
2002-03-20 Johan Bezem [EMAIL PROTECTED]

* vpath.c (build_vpaths_list) [__CYGWIN__]: Added conversion of DOS-like pathname for 
GPATH variable to canonical form.

* read.c (read_makefile) [__CYGWIN__]: Added conversion of DOS-like pathname for vpath 
directive to canonical form.

### vpath.c-patch ###
--- vpath.orig.cFri Mar 22 10:50:38 2002
+++ vpath.c Wed Mar 20 16:50:35 2002
@@ -144,6 +144,20 @@ build_vpath_lists ()
 will still be nil if P contains no existing directories.  */
   vpaths = 0;
 
+  /* CYGNUS LOCAL Cygwin */
+  /* FIXME: should this conversion only take place when in unixy_mode? */
+#ifdef __CYGWIN__
+  /* if a win32 VPATH path list, convert to posix path list */
+  if (!cygwin_posix_path_list_p (p))
+{
+  posixp = (char *)
+   alloca (cygwin_win32_to_posix_path_list_buf_size (p));
+  cygwin_win32_to_posix_path_list (p, posixp);
+  p = posixp;
+}
+#endif /* __CYGWIN__ */
+  /* END CYGNUS LOCAL */
+
   /* Parse P.  */
   construct_vpath_list (%, p);
 
### read.c-patch ###
--- read.orig.c Fri Mar 22 10:51:07 2002
+++ read.c  Wed Mar 20 16:51:36 2002
@@ -648,6 +648,21 @@ read_makefile (filename, flags)
  else
/* No pattern means remove all previous selective VPATH's.  */
pattern = 0;
+
+/* CYGNUS LOCAL Cygwin */
+/* FIXME: should this conversion only take place when in unixy_mode? */
+#ifdef __CYGWIN__
+/* if a win32 VPATH path list, convert to posix path list */
+if (!cygwin_posix_path_list_p (p))
+  {
+register char *posixp = (char *)
+alloca (cygwin_win32_to_posix_path_list_buf_size (p));
+cygwin_win32_to_posix_path_list (p, posixp);
+p = posixp;
+  }
+#endif /* __CYGWIN__ */
+/* END CYGNUS LOCAL */
+
  construct_vpath_list (pattern, p);
  if (pattern != 0)
free (pattern);

--
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/




Re: Strange behaviour of vpath with dos paths

2002-03-21 Thread Johan Bezem

Hi,

OK, so I think I fixed the problem with the vpath directive, I fixed
another related problem on the way (the GPATH variable shows the same
symptoms), I tested both fixes on my machine, and wrote a ChangeLog
entry.
Now, I want to contribute these fixes into the development chain for
CygWin make.
The GNU make project (http://savannah.gnu.org/projects/make) does not
contain the CygWin enhancements in its main development tree, but in
order to provide a valid diff, I'd have to incorporate my changes into
the latest CVS version and perform a diff, rather than using the sources
from the latest CygWin distribution.
I checked the CVS repository sources.redhat.com, but it seems to contain
only the core of the CygWin DLL's sources.
So, my question: Where can I find the repository of the CygWin make
package? Or otherwise, how to proceed from here?

Thanks,

Johan Bezem
CSK Software AG

Colm Aengus Murphy wrote:
 
 Hi folks,
 
 I am seeing strange behaviour when using dos paths in a gnu make vpath
 directive.
 The makefile I am using to test this funny is as follows:
 
 ---
 vpath %.out c:/make_test/out
 #vpath %.out /cygdrive/c/make_test/out
 
 #VPATH = c:/make_test/out
 #VPATH = /cygdrive/c/make_test/out
 
 test.out : \
test.input\
; echo test.input  out/test.out
 ---
 
 What I find is that vpath doesn't work when given a dos path.
 VPATH on the other hand does.
 
 For out application we need to use a dos path.
 The work around is for us to use VPATH but it seems a bit funny that
 vpath and VPATH behave differently under given dos paths.
 
 Has anyone any ideas about this ?
 
 Cheers
 
 Colm A
 
 P.S. I am using gnu make 3.79.1-4 and 1.3.5-2 of the cygwin dll.
 
 --
 -
  Colm Aengus Murphy,Tel   : +353 1 2911000
  Senior Hardware Design Engineer,   Direct Tel: +353 1 2911373
  Silicon  Software Systems,Fax   : +353 1 2911001
  South County Business Park,
  Leopardstown,  E-mail: [EMAIL PROTECTED]
  Dublin 18. WWW   : www.s3group.com
  Ireland
 -
 
 --
 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/



--
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/




Re: Strange behaviour of vpath with dos paths

2002-03-21 Thread Christopher Faylor

On Thu, Mar 21, 2002 at 05:08:45PM +0100, Johan Bezem wrote:
The GNU make project (http://savannah.gnu.org/projects/make) does not
contain the CygWin enhancements in its main development tree,

Nope.  They were unresponsive in my attempts to get the changes into
the main branch.  I sent two requests.

order to provide a valid diff, I'd have to incorporate my changes into
the latest CVS version and perform a diff, rather than using the sources
from the latest CygWin distribution.

No, you'd use the sources from the latest cygwin distribution.

I checked the CVS repository sources.redhat.com, but it seems to contain
only the core of the CygWin DLL's sources.

Right.  We try not to duplicate other repositories for the cygwin
release.

So, my question: Where can I find the repository of the CygWin make
package? Or otherwise, how to proceed from here?

You can't.  Use the make source tarball and submit ChangeLog + patch
here.

cgf

--
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/




Re: Strange behaviour of vpath with dos paths

2002-03-12 Thread Johan Bezem

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/




Re: Strange behaviour of vpath with dos paths

2002-03-01 Thread Soren Andersen

On 28 Feb 2002 at 11:24, Colm Aengus Murphy wrote:

 Hi Johan,
 
 I took a quick look at source code for make 3791-5
 
 It looks to me like vpathc (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


--
Unsubscribe info:  http://cygwincom/ml/#unsubscribe-simple
Bug reporting: http://cygwincom/bugshtml
Documentation: http://cygwincom/docshtml
FAQ:   http://cygwincom/faq/




Re: Strange behaviour of vpath with dos paths

2002-02-28 Thread Johan Bezem

Hi,

Colm Aengus Murphy wrote:
 
 Hi folks,
 
 I am seeing strange behaviour when using dos paths in a gnu make vpath
 directive
 The makefile I am using to test this funny is as follows:
 
 ---
 vpath %out c:/make_test/out
Error!
 #vpath %out /cygdrive/c/make_test/out
Works
 
 #VPATH = c:/make_test/out
Works
 #VPATH = /cygdrive/c/make_test/out
Works
 
 testout : \
testinput\
; echo testinput  out/testout
 ---
 
 What I find is that vpath doesn't work when given a dos path
 VPATH on the other hand does

Thanks, this is exactly the same problem I've seen just yesterday

SNIP
 PS I am using gnu make 3791-4 and 135-2 of the cygwin dll

Here: 3791-5 and 139-1 respectively
After upgrading to 1310-1 just yet, the problem persists
I'd say, this is a real candidate for a bug

Anyone else?

Thanks,

Johan Bezem
CSK Software AG

--
Unsubscribe info:  http://cygwincom/ml/#unsubscribe-simple
Bug reporting: http://cygwincom/bugshtml
Documentation: http://cygwincom/docshtml
FAQ:   http://cygwincom/faq/




Re: Strange behaviour of vpath with dos paths

2002-02-28 Thread Colm Aengus Murphy

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

-- 
- 
 Colm Aengus Murphy,Tel   : +353 1 2911000
 Senior Hardware Design Engineer,   Direct Tel: +353 1 2911373
 Silicon  Software Systems,Fax   : +353 1 2911001
 South County Business Park,
 Leopardstown,  E-mail: [EMAIL PROTECTED]
 Dublin 18. WWW   : www.s3group.com
 Ireland   
-



--
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/




Strange behaviour of vpath with dos paths

2002-02-27 Thread Colm Aengus Murphy

Hi folks,

I am seeing strange behaviour when using dos paths in a gnu make vpath 
directive.
The makefile I am using to test this funny is as follows:

---
vpath %.out c:/make_test/out
#vpath %.out /cygdrive/c/make_test/out

#VPATH = c:/make_test/out
#VPATH = /cygdrive/c/make_test/out

test.out : \
   test.input\
   ; echo test.input  out/test.out
---
  
What I find is that vpath doesn't work when given a dos path.
VPATH on the other hand does.

For out application we need to use a dos path.
The work around is for us to use VPATH but it seems a bit funny that 
vpath and VPATH behave differently under given dos paths.

Has anyone any ideas about this ?

Cheers

Colm A

P.S. I am using gnu make 3.79.1-4 and 1.3.5-2 of the cygwin dll.

-- 
- 
 Colm Aengus Murphy,Tel   : +353 1 2911000
 Senior Hardware Design Engineer,   Direct Tel: +353 1 2911373
 Silicon  Software Systems,Fax   : +353 1 2911001
 South County Business Park,
 Leopardstown,  E-mail: [EMAIL PROTECTED]
 Dublin 18. WWW   : www.s3group.com
 Ireland   
-



--
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/