re PR preprocessor/30468 (-M not fully chops dirname)

PR preprocessor/30468:
	* mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
	'./'.

From-SVN: r124068
This commit is contained in:
Tom Tromey
2007-04-23 14:26:51 +00:00
committed by Tom Tromey
parent 545c543d01
commit bcdb4b71c4
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2007-04-23 Tom Tromey <tromey@redhat.com>
PR preprocessor/30468:
* mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
'./'.
2006-12-29 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/29612

View File

@@ -1,5 +1,5 @@
/* Dependency generator for Makefile fragments.
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003, 2007 Free Software Foundation, Inc.
Contributed by Zack Weinberg, Mar 2000
This program is free software; you can redistribute it and/or modify it
@@ -141,7 +141,13 @@ apply_vpath (struct deps *d, const char *t)
/* Remove leading ./ in any case. */
while (t[0] == '.' && IS_DIR_SEPARATOR (t[1]))
t += 2;
{
t += 2;
/* If we removed a leading ./, then also remove any /s after the
first. */
while (IS_DIR_SEPARATOR (t[0]))
++t;
}
return t;
}