Module Name: src Committed By: rillig Date: Mon Nov 16 22:08:20 UTC 2020
Modified Files: src/usr.bin/make: main.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.475 -r1.476 src/usr.bin/make/main.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/main.c diff -u src/usr.bin/make/main.c:1.475 src/usr.bin/make/main.c:1.476 --- src/usr.bin/make/main.c:1.475 Mon Nov 16 18:28:27 2020 +++ src/usr.bin/make/main.c Mon Nov 16 22:08:20 2020 @@ -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 @@ main_Init(int argc, char **argv) /* * 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 @@ main_Init(int argc, char **argv) * parsing the makefile(s) */ Arch_Init(); - Targ_Init(); Suff_Init(); Trace_Init(tracefile);