mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-26 14:00:56 +00:00
Formerly remake.c.~42~
This commit is contained in:
parent
44078a3441
commit
e8a9cedc6a
1 changed files with 10 additions and 9 deletions
19
remake.c
19
remake.c
|
@ -932,15 +932,16 @@ library_search (lib)
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
char *libname = &(*lib)[2];
|
char *libname = &(*lib)[2]; /* Name without the `-l'. */
|
||||||
char *buf = xmalloc (sizeof (LIBDIR) + 8 + strlen (libname) + 4 + 2 + 1);
|
|
||||||
char **dp;
|
|
||||||
|
|
||||||
sprintf (buf, "lib%s.a", libname);
|
/* Buffer to construct possible names in. */
|
||||||
|
char *buf = xmalloc (sizeof (LIBDIR) + 8 + strlen (libname) + 4 + 2 + 1);
|
||||||
|
char *file, **dp;
|
||||||
|
|
||||||
/* Look first for `libNAME.a' in the current directory. */
|
/* Look first for `libNAME.a' in the current directory. */
|
||||||
|
|
||||||
if (name_mtime (libname) != (time_t) -1)
|
sprintf (buf, "lib%s.a", libname);
|
||||||
|
if (name_mtime (buf) != (time_t) -1)
|
||||||
{
|
{
|
||||||
*lib = buf;
|
*lib = buf;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -948,11 +949,11 @@ library_search (lib)
|
||||||
|
|
||||||
/* Now try VPATH search on that. */
|
/* Now try VPATH search on that. */
|
||||||
|
|
||||||
libname = buf;
|
file = buf;
|
||||||
if (vpath_search (&libname))
|
if (vpath_search (&file))
|
||||||
{
|
{
|
||||||
free (buf);
|
free (buf);
|
||||||
*lib = libname;
|
*lib = file;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -960,7 +961,7 @@ library_search (lib)
|
||||||
|
|
||||||
for (dp = dirs; *dp != 0; ++dp)
|
for (dp = dirs; *dp != 0; ++dp)
|
||||||
{
|
{
|
||||||
sprintf (buf, "%s/lib%s.a", *dp, &(*lib)[2]);
|
sprintf (buf, "%s/lib%s.a", *dp, libname);
|
||||||
if (name_mtime (buf) != (time_t) -1)
|
if (name_mtime (buf) != (time_t) -1)
|
||||||
{
|
{
|
||||||
*lib = buf;
|
*lib = buf;
|
||||||
|
|
Loading…
Reference in a new issue