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): clean up headers



details:   https://anonhg.NetBSD.org/src/rev/9b565bb09269
branches:  trunk
changeset: 942964:9b565bb09269
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 22 21:42:38 2020 +0000

description:
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".

diffstat:

 usr.bin/make/compat.c |   7 +++----
 usr.bin/make/cond.c   |  16 ++++++----------
 usr.bin/make/dir.h    |   5 +----
 usr.bin/make/for.c    |  12 +++---------
 usr.bin/make/job.c    |  10 +++-------
 usr.bin/make/lst.c    |   7 +++----
 usr.bin/make/make.h   |   3 ++-
 usr.bin/make/parse.c  |   8 +++-----
 usr.bin/make/suff.c   |   9 +++------
 usr.bin/make/var.c    |  10 +++-------
 10 files changed, 30 insertions(+), 57 deletions(-)

diffs (truncated from 342 to 300 lines):

diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/compat.c     Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
 #include    <sys/stat.h>
 #include    <sys/wait.h>
 
-#include    <assert.h>
 #include    <ctype.h>
 #include    <errno.h>
 #include    <signal.h>
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/cond.c       Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
  *
  */
 
-#include    <assert.h>
-#include    <ctype.h>
-#include    <errno.h>
+#include <errno.h>
 
-#include    "make.h"
-#include    "hash.h"
-#include    "dir.h"
-#include    "buf.h"
+#include "make.h"
+#include "dir.h"
 
 /*
  * The parsing of conditional expressions is based on this grammar:
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/dir.h
--- a/usr.bin/make/dir.h        Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/dir.h        Sat Aug 22 21:42:38 2020 +0000
@@ -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
 
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/for.c        Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
  *
  */
 
-#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
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/job.c        Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
 #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"
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/lst.c        Sat Aug 22 21:42:38 2020 +0000
@@ -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
 
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/make.h       Sat Aug 22 21:42:38 2020 +0000
@@ -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>
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/parse.c      Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
 #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>
diff -r 26aee6a47161 -r 9b565bb09269 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sat Aug 22 21:30:52 2020 +0000
+++ b/usr.bin/make/suff.c       Sat Aug 22 21:42:38 2020 +0000
@@ -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 @@
  *                             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 */



Home | Main Index | Thread Index | Old Index