Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): fix initialization order of modules (b...
details: https://anonhg.NetBSD.org/src/rev/a3e5292e6bfb
branches: trunk
changeset: 957095:a3e5292e6bfb
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Nov 16 22:08:20 2020 +0000
description:
make(1): fix initialization order of modules (broken since today)
In CLEANUP mode, Var_Init depends on Targ_Init since the variable scopes
are implemented as GNodes.
By the way, since 1999-09-15 variables are no longer stored in lists but
in hash tables.
diffstat:
usr.bin/make/main.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 330e701ee530 -r a3e5292e6bfb usr.bin/make/main.c
--- a/usr.bin/make/main.c Mon Nov 16 21:59:08 2020 +0000
+++ b/usr.bin/make/main.c Mon Nov 16 22:08:20 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.475 2020/11/16 18:28:27 rillig Exp $ */
+/* $NetBSD: main.c,v 1.476 2020/11/16 22:08:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.475 2020/11/16 18:28:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.476 2020/11/16 22:08:20 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1382,8 +1382,8 @@
/*
* Just in case MAKEOBJDIR wants us to do something tricky.
*/
- Var_Init(); /* Initialize the lists of variables for
- * parsing arguments */
+ Targ_Init();
+ Var_Init();
Var_Set(".MAKE.OS", utsname.sysname, VAR_GLOBAL);
Var_Set("MACHINE", machine, VAR_GLOBAL);
Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL);
@@ -1505,7 +1505,6 @@
* parsing the makefile(s)
*/
Arch_Init();
- Targ_Init();
Suff_Init();
Trace_Init(tracefile);
Home |
Main Index |
Thread Index |
Old Index