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): normalize initialization and cleanup o...
details: https://anonhg.NetBSD.org/src/rev/1d2e09274b43
branches: trunk
changeset: 955956:1d2e09274b43
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 17 21:32:30 2020 +0000
description:
make(1): normalize initialization and cleanup of the modules
diffstat:
usr.bin/make/arch.c | 10 +++++-----
usr.bin/make/dir.c | 12 ++++++------
usr.bin/make/job.c | 6 +++---
usr.bin/make/nonints.h | 21 ++++++++++++---------
usr.bin/make/parse.c | 20 +++++---------------
usr.bin/make/suff.c | 6 +++---
usr.bin/make/targ.c | 6 +++---
usr.bin/make/var.c | 8 ++++----
8 files changed, 41 insertions(+), 48 deletions(-)
diffs (truncated from 359 to 300 lines):
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/arch.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.132 2020/10/05 19:27:47 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.133 2020/10/17 21:32:30 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -114,7 +114,7 @@
*
* Arch_Init Initialize this module.
*
- * Arch_End Cleanup this module.
+ * Arch_End Clean up this module.
*/
#include <sys/types.h>
@@ -130,7 +130,7 @@
#include "config.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.132 2020/10/05 19:27:47 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.133 2020/10/17 21:32:30 rillig Exp $");
#ifdef TARGET_MACHINE
#undef MAKE_MACHINE
@@ -1123,14 +1123,14 @@
return oodate;
}
-/* Initialize things for this module. */
+/* Initialize the archives module. */
void
Arch_Init(void)
{
archives = Lst_Init();
}
-/* Clean up things for this module. */
+/* Clean up the archives module. */
void
Arch_End(void)
{
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/dir.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.163 2020/10/17 21:32:30 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -82,7 +82,7 @@
*
* Dir_InitDot Set the dot CachedDir.
*
- * Dir_End Cleanup the module.
+ * Dir_End Clean up the module.
*
* Dir_SetPATH Set ${.PATH} to reflect state of dirSearchPath.
*
@@ -135,7 +135,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.163 2020/10/17 21:32:30 rillig Exp $");
#define DIR_DEBUG0(text) DEBUG0(DIR, text)
#define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -388,7 +388,7 @@
return cached_stats(&lmtimes, pathname, st, CST_LSTAT);
}
-/* Initialize things for this module. */
+/* Initialize the directories module. */
void
Dir_Init(void)
{
@@ -427,7 +427,7 @@
dir->refCount++;
if (cur && cur != dir) {
/*
- * We've been here before, cleanup.
+ * We've been here before, clean up.
*/
cur->refCount--;
Dir_Destroy(cur);
@@ -462,7 +462,7 @@
Dir_SetPATH(); /* initialize */
}
-/* Clean up things for this module. */
+/* Clean up the directories module. */
void
Dir_End(void)
{
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/job.c
--- a/usr.bin/make/job.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/job.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.262 2020/10/06 16:39:23 rillig Exp $ */
+/* $NetBSD: job.c,v 1.263 2020/10/17 21:32:30 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -97,7 +97,7 @@
* Hence, the makefile must have been parsed
* before this function is called.
*
- * Job_End Cleanup any memory used.
+ * Job_End Clean up any memory used.
*
* Job_ParseShell Given the line following a .SHELL target, parse
* the line as a shell specification. Returns
@@ -143,7 +143,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.262 2020/10/06 16:39:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.263 2020/10/17 21:32:30 rillig Exp $");
# define STATIC static
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/nonints.h Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.140 2020/10/05 19:27:47 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.141 2020/10/17 21:32:30 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -73,6 +73,9 @@
*/
/* arch.c */
+void Arch_Init(void);
+void Arch_End(void);
+
Boolean Arch_ParseArchive(char **, GNodeList *, GNode *);
void Arch_Touch(GNode *);
void Arch_TouchLib(GNode *);
@@ -80,8 +83,6 @@
time_t Arch_MemMTime(GNode *);
void Arch_FindLib(GNode *, SearchPath *);
Boolean Arch_LibOODate(GNode *);
-void Arch_Init(void);
-void Arch_End(void);
Boolean Arch_IsLib(GNode *);
/* compat.c */
@@ -120,6 +121,8 @@
char *cached_realpath(const char *, char *);
/* parse.c */
+void Parse_Init(void);
+void Parse_End(void);
typedef enum VarAssignOp {
VAR_NORMAL, /* = */
@@ -143,8 +146,6 @@
void Parse_DoVar(VarAssign *, GNode *);
void Parse_AddIncludeDir(const char *);
void Parse_File(const char *, int);
-void Parse_Init(void);
-void Parse_End(void);
void Parse_SetInput(const char *, int, int, char *(*)(void *, size_t *), void *);
GNodeList *Parse_MainName(void);
@@ -168,6 +169,9 @@
Boolean Str_Match(const char *, const char *);
/* suff.c */
+void Suff_Init(void);
+void Suff_End(void);
+
void Suff_ClearSuffixes(void);
Boolean Suff_IsTransform(const char *);
GNode *Suff_AddTransform(const char *);
@@ -180,13 +184,12 @@
void Suff_FindDeps(GNode *);
SearchPath *Suff_FindPath(GNode *);
void Suff_SetNull(const char *);
-void Suff_Init(void);
-void Suff_End(void);
void Suff_PrintAll(void);
/* targ.c */
void Targ_Init(void);
void Targ_End(void);
+
void Targ_Stats(void);
GNodeList *Targ_List(void);
GNode *Targ_NewGN(const char *);
@@ -208,6 +211,8 @@
void Targ_Propagate(void);
/* var.c */
+void Var_Init(void);
+void Var_End(void);
typedef enum {
VARE_NONE = 0,
@@ -291,8 +296,6 @@
VarParseResult Var_Parse(const char **, GNode *, VarEvalFlags,
const char **, void **);
VarParseResult Var_Subst(const char *, GNode *, VarEvalFlags, char **);
-void Var_Init(void);
-void Var_End(void);
void Var_Stats(void);
void Var_Dump(GNode *);
void Var_ExportVars(void);
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/parse.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.382 2020/10/17 21:21:37 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.383 2020/10/17 21:32:30 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -91,7 +91,7 @@
* called before anything else in this module
* is used.
*
- * Parse_End Cleanup the module
+ * Parse_End Clean up the module
*
* Parse_File Function used to parse a makefile. It must
* be given the name of the file, which should
@@ -131,7 +131,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.382 2020/10/17 21:21:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.383 2020/10/17 21:32:30 rillig Exp $");
/* types and constants */
@@ -3119,18 +3119,7 @@
}
}
-/*-
- *---------------------------------------------------------------------
- * Parse_Init --
- * initialize the parsing module
- *
- * Results:
- * none
- *
- * Side Effects:
- * the parseIncPath list is initialized...
- *---------------------------------------------------------------------
- */
+/* Initialize the parsing module. */
void
Parse_Init(void)
{
@@ -3144,6 +3133,7 @@
#endif
}
+/* Clean up the parsing module. */
void
Parse_End(void)
{
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/suff.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.178 2020/10/17 17:47:14 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.179 2020/10/17 21:32:30 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -76,7 +76,7 @@
* Interface:
* Suff_Init Initialize all things to do with suffixes.
*
- * Suff_End Cleanup the module
+ * Suff_End Clean up the module
*
* Suff_DoPaths This function is used to make life easier
* when searching for a file according to its
@@ -129,7 +129,7 @@
#include "dir.h"
/* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.178 2020/10/17 17:47:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.179 2020/10/17 21:32:30 rillig Exp $");
#define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
#define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
diff -r f1664fe005a1 -r 1d2e09274b43 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c Sat Oct 17 21:21:37 2020 +0000
+++ b/usr.bin/make/targ.c Sat Oct 17 21:32:30 2020 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index