mirror of
https://github.com/mirror/make.git
synced 2025-03-13 19:30:41 +08:00
* src/arscan.c (ar_name_equal): Support GNU ar's -P option.
This commit is contained in:
parent
882d59c672
commit
0b91f42f58
@ -852,6 +852,11 @@ ar_name_equal (const char *name, const char *mem, int truncated)
|
|||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
|
/* GNU ar allows -P to preserve parent paths, so test the literal name
|
||||||
|
before stripping off the directory. */
|
||||||
|
if (streq (name, mem))
|
||||||
|
return 1;
|
||||||
|
|
||||||
p = strrchr (name, '/');
|
p = strrchr (name, '/');
|
||||||
if (p != 0)
|
if (p != 0)
|
||||||
name = p + 1;
|
name = p + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user