Module Name: src Committed By: matthias Date: Tue Mar 15 06:25:14 UTC 2016
Modified Files: src/usr.bin/make: suff.c Log Message: dynamic dependencies for library member targets are working again. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.79 src/usr.bin/make/suff.c:1.80 --- src/usr.bin/make/suff.c:1.79 Mon Mar 14 07:42:15 2016 +++ src/usr.bin/make/suff.c Tue Mar 15 06:25:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.79 2016/03/14 07:42:15 matthias Exp $ */ +/* $NetBSD: suff.c,v 1.80 2016/03/15 06:25:14 matthias Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: suff.c,v 1.79 2016/03/14 07:42:15 matthias Exp $"; +static char rcsid[] = "$NetBSD: suff.c,v 1.80 2016/03/15 06:25:14 matthias Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else -__RCSID("$NetBSD: suff.c,v 1.79 2016/03/14 07:42:15 matthias Exp $"); +__RCSID("$NetBSD: suff.c,v 1.80 2016/03/15 06:25:14 matthias Exp $"); #endif #endif /* not lint */ #endif @@ -1894,6 +1894,7 @@ SuffFindArchiveDeps(GNode *gn, Lst slst) TARGET, /* Must be first */ PREFIX, /* Must be second */ }; + LstNode ln, nln; /* Next suffix node to check */ int i; /* Index into copy and vals */ Suff *ms; /* Suffix descriptor for member */ char *name; /* Start of member's name */ @@ -1959,7 +1960,16 @@ SuffFindArchiveDeps(GNode *gn, Lst slst) * Set $@ for compatibility with other makes */ Var_Set(TARGET, gn->name, gn, 0); - + + /* + * Now we've got the important local variables set, expand any sources + * that still contain variables or wildcards in their names. + */ + for (ln = Lst_First(gn->children); ln != NULL; ln = nln) { + nln = Lst_Succ(ln); + SuffExpandChildren(ln, gn); + } + if (ms != NULL) { /* * Member has a known suffix, so look for a transformation rule from @@ -1967,7 +1977,6 @@ SuffFindArchiveDeps(GNode *gn, Lst slst) * through the entire list, we just look at suffixes to which the * member's suffix may be transformed... */ - LstNode ln; SuffixCmpData sd; /* Search string data */ /*