diff options
author | Roland McGrath <roland@redhat.com> | 1992-03-31 00:24:58 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-03-31 00:24:58 +0000 |
commit | 008dab1b259c1d032a0b3e073e0e67a4615f8412 (patch) | |
tree | 0858faeaff4b44b3f195c6dffcc1de3eafc93737 | |
parent | d922934cf80c9f50a3e2243ffb326eea829b2047 (diff) | |
download | gunmake-008dab1b259c1d032a0b3e073e0e67a4615f8412.tar.gz |
Formerly commands.c.~2~
-rw-r--r-- | commands.c | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -1,5 +1,5 @@ /* Command processing for GNU Make. -Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. +Copyright (C) 1988, 1989, 1991, 1992 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -74,13 +74,28 @@ set_file_variables (file) any suffix in the .SUFFIXES list stripped off for explicit rules. We store this in the `stem' member. */ register struct dep *d; + char *name; + unsigned int len; + +#ifndef NO_ARCHIVES + if (ar_name (file->name)) + { + name = index (file->name, '(') + 1; + len = strlen (name) - 1; + } + else +#endif + { + name = file->name; + len = strlen (name); + } + for (d = enter_file (".SUFFIXES")->deps; d != 0; d = d->next) { - unsigned int len = strlen (file->name); unsigned int slen = strlen (dep_name (d)); - if (len > slen && streq (dep_name (d), file->name + len - slen)) + if (len > slen && !strncmp (dep_name (d), name + len - slen, slen)) { - file->stem = savestring (file->name, len - slen); + file->stem = savestring (name, len - slen); break; } } |