summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2000-06-10 21:44:08 +0000
committermycroft <mycroft@NetBSD.org>2000-06-10 21:44:08 +0000
commitedfd0106e2073cd3d872914503cd4609eb31f530 (patch)
tree95b62b99a302b43d8a82f1b5a0c8180318824f58 /usr.bin/make/parse.c
parentd26027dd5b41d52696b4efd5ccb21e698f8cd59f (diff)
Introduce an OP_MARK bit, and use it to suppress duplicates during .ALLSRC
and .USE expansion. Also, remove some more Lst_Member() checks that are now redundant.
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 9ebe2204a6a..0148d7e5f5a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $ */
+/* $NetBSD: parse.c,v 1.50 2000/06/10 21:44:08 mycroft Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.50 2000/06/10 21:44:08 mycroft Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $");
+__RCSID("$NetBSD: parse.c,v 1.50 2000/06/10 21:44:08 mycroft Exp $");
#endif
#endif /* not lint */
#endif
@@ -443,19 +443,13 @@ ParseLinkSrc (pgnp, cgnp)
{
GNode *pgn = (GNode *) pgnp;
GNode *cgn = (GNode *) cgnp;
+
if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (pgn->cohorts))
pgn = (GNode *) Lst_Datum (Lst_Last (pgn->cohorts));
-#if 0
- if (Lst_Member (pgn->children, (ClientData)cgn) == NILLNODE) {
-#else
- if (1) {
-#endif
- (void)Lst_AtEnd (pgn->children, (ClientData)cgn);
- if (specType == Not) {
+ (void)Lst_AtEnd (pgn->children, (ClientData)cgn);
+ if (specType == Not)
(void)Lst_AtEnd (cgn->parents, (ClientData)pgn);
- }
- pgn->unmade += 1;
- }
+ pgn->unmade += 1;
return (0);
}