summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-11-21 23:21:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-11-21 23:21:55 +0000
commit34fc569cd84b7316a79f88cd8578cffc5515f047 (patch)
tree5fe7b061466b537dd70b7bade3d07971f7458dd3 /usr.bin/make
parentce5caeba532526fa17bf47fa018447d619c27448 (diff)
${.ALLSRC} and ${.OODATE} should always be defined, even for empty lists
of prerequisites. This prevents complaints from the var module and from other developers. That's a bug I introduced 5 years ago... found out by miod@ okay miod@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/engine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index 654fae793e5..231e3280def 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.38 2012/10/18 17:54:43 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.39 2012/11/21 23:21:54 espie Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -346,6 +346,9 @@ Make_DoAllVar(GNode *gn)
oodate_count = 0;
allsrc_count = 0;
+ Var(OODATE_INDEX, gn) = "";
+ Var(ALLSRC_INDEX, gn) = "";
+
for (ln = Lst_First(&gn->children); ln != NULL; ln = Lst_Adv(ln)) {
child = (GNode *)Lst_Datum(ln);
if ((child->type & (OP_EXEC|OP_USE|OP_INVISIBLE)) != 0)