summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-06-03 16:33:49 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-06-03 16:33:49 +0000
commit93387e0bc9e3d76555f9339a0ebb2f118b74217d (patch)
treea271c3772f0711e031ba58fb61ab44bd22b1bb80 /usr.bin/make
parentdd9562820f9e4b9a14d1dc35f4829a0c76b4aa71 (diff)
Make sure targs get initialized.
Don't bother cleaning it up for speed
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 26bc458cc98..44194425161 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: main.c,v 1.51 2001/05/31 13:38:48 espie Exp $ */
+/* $OpenBSD: main.c,v 1.52 2001/06/03 16:33:48 espie Exp $ */
/* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */
/*
@@ -586,6 +586,8 @@ main(argc, argv)
Lst_Init(create);
Lst_Init(&makefiles);
Lst_Init(&varstoprint);
+ Lst_Init(&targs);
+
beSilent = false; /* Print commands as executed */
ignoreErrors = false; /* Pay attention to non-zero returns */
noExecute = false; /* Execute all commands */
@@ -743,7 +745,6 @@ main(argc, argv)
/* Have now read the entire graph and need to make a list of targets
* to create. If none was given on the command line, we consult the
* parsing module to find the main target(s) to create. */
- Lst_Init(&targs);
if (Lst_IsEmpty(create))
Parse_MainName(&targs);
else
@@ -769,10 +770,12 @@ main(argc, argv)
}
}
+#ifdef CLEANUP
Lst_Destroy(&targs, NOFREE);
Lst_Destroy(&varstoprint, NOFREE);
Lst_Destroy(&makefiles, NOFREE);
Lst_Destroy(create, (SimpleProc)free);
+#endif
/* print the graph now it's been processed if the user requested it */
if (DEBUG(GRAPH2))