Module Name: src
Committed By: rillig
Date: Sat Aug 22 21:42:38 UTC 2020
Modified Files:
src/usr.bin/make: compat.c cond.c dir.h for.c job.c lst.c make.h
parse.c suff.c var.c
Log Message:
make(1): clean up headers
Remove redundant headers that are already included by "make.h".
Make <assert.h> available to all compilation units that use "make.h".
To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/compat.c
cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/cond.c
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/dir.h
cvs rdiff -u -r1.63 -r1.64 src/usr.bin/make/for.c
cvs rdiff -u -r1.213 -r1.214 src/usr.bin/make/job.c
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/lst.c
cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/make.h
cvs rdiff -u -r1.259 -r1.260 src/usr.bin/make/parse.c
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/make/suff.c
cvs rdiff -u -r1.458 -r1.459 src/usr.bin/make/var.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/compat.c
diff -u src/usr.bin/make/compat.c:1.125 src/usr.bin/make/compat.c:1.126
--- src/usr.bin/make/compat.c:1.125 Sat Aug 22 19:53:22 2020
+++ src/usr.bin/make/compat.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.125 2020/08/22 19:53:22 rillig Exp $ */
+/* $NetBSD: compat.c,v 1.126 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.125 2020/08/22 19:53:22 rillig Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.126 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.125 2020/08/22 19:53:22 rillig Exp $");
+__RCSID("$NetBSD: compat.c,v 1.126 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -99,7 +99,6 @@ __RCSID("$NetBSD: compat.c,v 1.125 2020/
#include <sys/stat.h>
#include <sys/wait.h>
-#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.98 src/usr.bin/make/cond.c:1.99
--- src/usr.bin/make/cond.c:1.98 Thu Aug 20 18:47:57 2020
+++ src/usr.bin/make/cond.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.98 2020/08/20 18:47:57 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.99 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.98 2020/08/20 18:47:57 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.99 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: cond.c,v 1.98 2020/08/20 18:47:57 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.99 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -91,14 +91,10 @@ __RCSID("$NetBSD: cond.c,v 1.98 2020/08/
*
*/
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "make.h"
-#include "hash.h"
-#include "dir.h"
-#include "buf.h"
+#include <errno.h>
+
+#include "make.h"
+#include "dir.h"
/*
* The parsing of conditional expressions is based on this grammar:
Index: src/usr.bin/make/dir.h
diff -u src/usr.bin/make/dir.h:1.19 src/usr.bin/make/dir.h:1.20
--- src/usr.bin/make/dir.h:1.19 Sat Aug 22 00:48:02 2020
+++ src/usr.bin/make/dir.h Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.h,v 1.19 2020/08/22 00:48:02 rillig Exp $ */
+/* $NetBSD: dir.h,v 1.20 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -72,9 +72,6 @@
* from: @(#)dir.h 8.1 (Berkeley) 6/6/93
*/
-/* dir.h --
- */
-
#ifndef MAKE_DIR_H
#define MAKE_DIR_H
Index: src/usr.bin/make/for.c
diff -u src/usr.bin/make/for.c:1.63 src/usr.bin/make/for.c:1.64
--- src/usr.bin/make/for.c:1.63 Sun Aug 9 19:51:02 2020
+++ src/usr.bin/make/for.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: for.c,v 1.63 2020/08/09 19:51:02 rillig Exp $ */
+/* $NetBSD: for.c,v 1.64 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1992, The Regents of the University of California.
@@ -30,14 +30,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: for.c,v 1.63 2020/08/09 19:51:02 rillig Exp $";
+static char rcsid[] = "$NetBSD: for.c,v 1.64 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: for.c,v 1.63 2020/08/09 19:51:02 rillig Exp $");
+__RCSID("$NetBSD: for.c,v 1.64 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -52,13 +52,7 @@ __RCSID("$NetBSD: for.c,v 1.63 2020/08/0
*
*/
-#include <assert.h>
-#include <ctype.h>
-
#include "make.h"
-#include "hash.h"
-#include "dir.h"
-#include "buf.h"
#include "strlist.h"
#define FOR_SUB_ESCAPE_CHAR 1
Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.213 src/usr.bin/make/job.c:1.214
--- src/usr.bin/make/job.c:1.213 Sat Aug 22 19:30:58 2020
+++ src/usr.bin/make/job.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.213 2020/08/22 19:30:58 sjg Exp $ */
+/* $NetBSD: job.c,v 1.214 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.213 2020/08/22 19:30:58 sjg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.214 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: job.c,v 1.213 2020/08/22 19:30:58 sjg Exp $");
+__RCSID("$NetBSD: job.c,v 1.214 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -139,18 +139,14 @@ __RCSID("$NetBSD: job.c,v 1.213 2020/08/
#include <sys/time.h>
#include <sys/wait.h>
-#include <assert.h>
#include <errno.h>
#ifndef USE_SELECT
#include <poll.h>
#endif
#include <signal.h>
-#include <stdio.h>
-#include <string.h>
#include <utime.h>
#include "make.h"
-#include "hash.h"
#include "dir.h"
#include "job.h"
#include "pathnames.h"
Index: src/usr.bin/make/lst.c
diff -u src/usr.bin/make/lst.c:1.31 src/usr.bin/make/lst.c:1.32
--- src/usr.bin/make/lst.c:1.31 Sat Aug 22 17:34:25 2020
+++ src/usr.bin/make/lst.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.31 2020/08/22 17:34:25 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.32 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -32,17 +32,16 @@
* SUCH DAMAGE.
*/
-#include <assert.h>
#include <stdint.h>
#include "make.h"
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lst.c,v 1.31 2020/08/22 17:34:25 rillig Exp $";
+static char rcsid[] = "$NetBSD: lst.c,v 1.32 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: lst.c,v 1.31 2020/08/22 17:34:25 rillig Exp $");
+__RCSID("$NetBSD: lst.c,v 1.32 2020/08/22 21:42:38 rillig Exp $");
#endif /* not lint */
#endif
Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.122 src/usr.bin/make/make.h:1.123
--- src/usr.bin/make/make.h:1.122 Sat Aug 22 19:27:22 2020
+++ src/usr.bin/make/make.h Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.122 2020/08/22 19:27:22 rillig Exp $ */
+/* $NetBSD: make.h,v 1.123 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -83,6 +83,7 @@
#include <sys/types.h>
#include <sys/param.h>
+#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.259 src/usr.bin/make/parse.c:1.260
--- src/usr.bin/make/parse.c:1.259 Sat Aug 22 21:12:29 2020
+++ src/usr.bin/make/parse.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.259 2020/08/22 21:12:29 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.260 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.259 2020/08/22 21:12:29 rillig Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.260 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.259 2020/08/22 21:12:29 rillig Exp $");
+__RCSID("$NetBSD: parse.c,v 1.260 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -126,8 +126,6 @@ __RCSID("$NetBSD: parse.c,v 1.259 2020/0
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
-#include <assert.h>
-#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.108 src/usr.bin/make/suff.c:1.109
--- src/usr.bin/make/suff.c:1.108 Sat Aug 22 18:44:22 2020
+++ src/usr.bin/make/suff.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.108 2020/08/22 18:44:22 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.109 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.108 2020/08/22 18:44:22 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.109 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-__RCSID("$NetBSD: suff.c,v 1.108 2020/08/22 18:44:22 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.109 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -135,10 +135,7 @@ __RCSID("$NetBSD: suff.c,v 1.108 2020/08
* order to find the node.
*/
-#include <assert.h>
-#include <stdio.h>
#include "make.h"
-#include "hash.h"
#include "dir.h"
static Lst sufflist; /* Lst of suffixes */
Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.458 src/usr.bin/make/var.c:1.459
--- src/usr.bin/make/var.c:1.458 Sat Aug 22 20:31:50 2020
+++ src/usr.bin/make/var.c Sat Aug 22 21:42:38 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.458 2020/08/22 20:31:50 rillig Exp $ */
+/* $NetBSD: var.c,v 1.459 2020/08/22 21:42:38 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.458 2020/08/22 20:31:50 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.459 2020/08/22 21:42:38 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.458 2020/08/22 20:31:50 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.459 2020/08/22 21:42:38 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -124,15 +124,11 @@ __RCSID("$NetBSD: var.c,v 1.458 2020/08/
#include <sys/types.h>
#include <regex.h>
#endif
-#include <assert.h>
-#include <ctype.h>
#include <inttypes.h>
#include <limits.h>
-#include <stdlib.h>
#include <time.h>
#include "make.h"
-#include "buf.h"
#include "enum.h"
#include "dir.h"
#include "job.h"