mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-16 18:42:40 +00:00
Fix bug #11183.
This commit is contained in:
parent
a6bdc58385
commit
df267b31c5
2 changed files with 23 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2006-02-13 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* implicit.c (pattern_search): Add checking for DOS pathnames to
|
||||||
|
the pattern rule target LASTSLASH manipulation.
|
||||||
|
Fixes Savannah bug #11183.
|
||||||
|
|
||||||
2006-02-11 Paul D. Smith <psmith@gnu.org>
|
2006-02-11 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* (ALL FILES): Updated copyright and license notices.
|
* (ALL FILES): Updated copyright and license notices.
|
||||||
|
|
23
implicit.c
23
implicit.c
|
@ -346,17 +346,28 @@ pattern_search (struct file *file, int archive,
|
||||||
/* Set CHECK_LASTSLASH if FILENAME contains a directory
|
/* Set CHECK_LASTSLASH if FILENAME contains a directory
|
||||||
prefix and the target pattern does not contain a slash. */
|
prefix and the target pattern does not contain a slash. */
|
||||||
|
|
||||||
|
check_lastslash = 0;
|
||||||
|
if (lastslash)
|
||||||
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
check_lastslash = lastslash != 0
|
check_lastslash = (strchr (target, ']') == 0
|
||||||
&& ((strchr (target, ']') == 0)
|
&& strchr (target, ':') == 0);
|
||||||
&& (strchr (target, ':') == 0));
|
|
||||||
#else
|
#else
|
||||||
check_lastslash = lastslash != 0 && strchr (target, '/') == 0;
|
check_lastslash = strchr (target, '/') == 0;
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
/* Didn't find it yet: check for DOS-type directories. */
|
||||||
|
if (!check_lastslash)
|
||||||
|
{
|
||||||
|
char *b = strrchr (target, '\\');
|
||||||
|
check_lastslash = !(b ? b > lastslash
|
||||||
|
: (target[0] && target[1] == ':'));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
if (check_lastslash)
|
if (check_lastslash)
|
||||||
{
|
{
|
||||||
/* In that case, don't include the
|
/* If so, don't include the directory prefix in STEM here. */
|
||||||
directory prefix in STEM here. */
|
|
||||||
unsigned int difference = lastslash - filename + 1;
|
unsigned int difference = lastslash - filename + 1;
|
||||||
if (difference > stemlen)
|
if (difference > stemlen)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue