mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-11-25 04:35:44 +00:00
vpath.c (construct_vpath_list) [HAVE_DOS_PATHS]: Support VPATH values that
use `:' in drive letters, when PATH_SEPARATOR_CHAR is also `:'.
This commit is contained in:
parent
8025f93312
commit
c233a70323
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-12-22 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* vpath.c (construct_vpath_list) [HAVE_DOS_PATHS]: Support VPATH
|
||||
values that use `:' in drive letters, when PATH_SEPARATOR_CHAR is
|
||||
also `:'.
|
||||
|
||||
2007-11-04 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* doc/make.texi: Convert references to "commands", "command
|
||||
|
|
14
vpath.c
14
vpath.c
|
@ -234,14 +234,24 @@ construct_vpath_list (char *pattern, char *dirpath)
|
|||
|
||||
/* 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
|
||||
|
|
Loading…
Reference in a new issue