make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VPATH of the form C:/foo


From: Eli Zaretskii
Subject: Re: VPATH of the form C:/foo
Date: Sat, 15 Dec 2007 15:50:24 +0200

> Cc: address@hidden
> From: Benoit Sigoure <address@hidden>
> Date: Thu, 29 Nov 2007 23:36:45 +0100
> 
> > Ah, I see the problem: the native Windows port (which is what I have)
> > converts all `:' that are not part of drive letter spec to `;' (by
> > calling convert_vpath_to_windows32), and then Make parses that using
> > `;' as PATH_SEPARATOR_CHAR, which makes "C:/foo:D:/bar" work.  But in
> > the Cygwin build, convert_vpath_to_windows32 is not called and
> > PATH_SEPARATOR_CHAR is `:', so this does not work.
> >
> > I will try to post an experimental patch soon.  Thanks for pointing
> > out this problem.
> 
> 
> Thank you very much, I'm eager to see the patch ;)

Sorry for the long delay.  Please try the patch below:

2007-12-15  Eli Zaretskii  <address@hidden>

        * vpath.c (construct_vpath_list) [HAVE_DOS_PATHS]: Support VPATH
        values that use `:' in drive letters, when PATH_SEPARATOR_CHAR is
        also `:'.

--- vpath.c~0   2006-02-12 02:16:05.000000000 +0200
+++ vpath.c     2007-12-15 15:40:30.864428300 +0200
@@ -239,14 +239,24 @@ construct_vpath_list (char *pattern, cha
 
       /* Find the end of this entry.  */
       v = p;
-      while (*p != '\0' && *p != PATH_SEPARATOR_CHAR
+      while (*p != '\0'
+#if defined(HAVE_DOS_PATHS) && (PATH_SEPARATOR_CHAR == ':')
+            /* Platforms whose PATH_SEPARATOR_CHAR is ':' and which
+               also define HAVE_DOS_PATHS would like us to recognize
+               colons after the drive letter in the likes of
+               "D:/foo/bar:C:/xyzzy".  */
+            && (*p != PATH_SEPARATOR_CHAR
+                || (p == v + 1 && (p[1] == '/' || p[1] == '\\')))
+#else
+            && *p != PATH_SEPARATOR_CHAR
+#endif
             && !isblank ((unsigned char)*p))
        ++p;
 
       len = p - v;
       /* Make sure there's no trailing slash,
         but still allow "/" as a directory.  */
-#if defined(__MSDOS__) || defined(__EMX__)
+#if defined(__MSDOS__) || defined(__EMX__) || defined(HAVE_DOS_PATHS)
       /* We need also to leave alone a trailing slash in "d:/".  */
       if (len > 3 || (len > 1 && v[1] != ':'))
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]