Module Name:    src
Committed By:   rillig
Date:           Sun Sep 13 15:15:51 UTC 2020

Modified Files:
        src/usr.bin/make: arch.c buf.c compat.c cond.c dir.c enum.c for.c
            hash.c job.c lst.c main.c make.c make.h make_malloc.c metachar.c
            parse.c str.c strlist.c suff.c targ.c trace.c util.c var.c

Log Message:
make(1): clean up RCSID blocks

These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/arch.c
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/make/buf.c
cvs rdiff -u -r1.144 -r1.145 src/usr.bin/make/compat.c
cvs rdiff -u -r1.143 -r1.144 src/usr.bin/make/cond.c
cvs rdiff -u -r1.141 -r1.142 src/usr.bin/make/dir.c src/usr.bin/make/make.h
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/enum.c src/usr.bin/make/strlist.c
cvs rdiff -u -r1.82 -r1.83 src/usr.bin/make/for.c
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/make/hash.c
cvs rdiff -u -r1.231 -r1.232 src/usr.bin/make/job.c
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/make/lst.c
cvs rdiff -u -r1.336 -r1.337 src/usr.bin/make/main.c
cvs rdiff -u -r1.135 -r1.136 src/usr.bin/make/make.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/make_malloc.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/metachar.c
cvs rdiff -u -r1.302 -r1.303 src/usr.bin/make/parse.c
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/make/str.c
cvs rdiff -u -r1.154 -r1.155 src/usr.bin/make/suff.c
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/make/targ.c
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/make/trace.c
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/make/util.c
cvs rdiff -u -r1.511 -r1.512 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/arch.c
diff -u src/usr.bin/make/arch.c:1.113 src/usr.bin/make/arch.c:1.114
--- src/usr.bin/make/arch.c:1.113	Sun Sep 13 06:15:29 2020
+++ src/usr.bin/make/arch.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.113 2020/09/13 06:15:29 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.114 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.113 2020/09/13 06:15:29 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)arch.c	8.2 (Berkeley) 1/2/94";
-#else
-__RCSID("$NetBSD: arch.c,v 1.113 2020/09/13 06:15:29 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * arch.c --
  *	Functions to manipulate libraries, archives and their members.
@@ -145,6 +132,9 @@ __RCSID("$NetBSD: arch.c,v 1.113 2020/09
 #include    "dir.h"
 #include    "config.h"
 
+/*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
+MAKE_RCSID("$NetBSD: arch.c,v 1.114 2020/09/13 15:15:51 rillig Exp $");
+
 #ifdef TARGET_MACHINE
 #undef MAKE_MACHINE
 #define MAKE_MACHINE TARGET_MACHINE

Index: src/usr.bin/make/buf.c
diff -u src/usr.bin/make/buf.c:1.37 src/usr.bin/make/buf.c:1.38
--- src/usr.bin/make/buf.c:1.37	Sun Aug 23 08:21:50 2020
+++ src/usr.bin/make/buf.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: buf.c,v 1.37 2020/08/23 08:21:50 rillig Exp $	*/
+/*	$NetBSD: buf.c,v 1.38 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,24 +69,14 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: buf.c,v 1.37 2020/08/23 08:21:50 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)buf.c	8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: buf.c,v 1.37 2020/08/23 08:21:50 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /* Functions for automatically-expanded null-terminated buffers. */
 
 #include <limits.h>
 #include "make.h"
 
+/*	"@(#)buf.c	8.1 (Berkeley) 6/6/93"	*/
+MAKE_RCSID("$NetBSD: buf.c,v 1.38 2020/09/13 15:15:51 rillig Exp $");
+
 /* Extend the buffer for adding a single byte. */
 void
 Buf_Expand_1(Buffer *bp)

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.144 src/usr.bin/make/compat.c:1.145
--- src/usr.bin/make/compat.c:1.144	Sun Sep 13 06:36:54 2020
+++ src/usr.bin/make/compat.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.144 2020/09/13 06:36:54 rillig Exp $	*/
+/*	$NetBSD: compat.c,v 1.145 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,19 +69,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.144 2020/09/13 06:36:54 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.144 2020/09/13 06:36:54 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * compat.c --
  *	The routines in this file implement the full-compatibility
@@ -111,6 +98,8 @@ __RCSID("$NetBSD: compat.c,v 1.144 2020/
 #include    "metachar.h"
 #include    "pathnames.h"
 
+/*	"@(#)compat.c	8.2 (Berkeley) 3/19/94"	*/
+MAKE_RCSID("$NetBSD: compat.c,v 1.145 2020/09/13 15:15:51 rillig Exp $");
 
 static GNode	    *curTarg = NULL;
 static GNode	    *ENDNode;

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.143 src/usr.bin/make/cond.c:1.144
--- src/usr.bin/make/cond.c:1.143	Sun Sep 13 13:53:55 2020
+++ src/usr.bin/make/cond.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.143 2020/09/13 13:53:55 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.144 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,19 +69,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.143 2020/09/13 13:53:55 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.143 2020/09/13 13:53:55 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /* Handling of conditionals in a makefile.
  *
  * Interface:
@@ -105,6 +92,9 @@ __RCSID("$NetBSD: cond.c,v 1.143 2020/09
 #include "make.h"
 #include "dir.h"
 
+/*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
+MAKE_RCSID("$NetBSD: cond.c,v 1.144 2020/09/13 15:15:51 rillig Exp $");
+
 /*
  * The parsing of conditional expressions is based on this grammar:
  *	E -> F || E

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.141 src/usr.bin/make/dir.c:1.142
--- src/usr.bin/make/dir.c:1.141	Sat Sep 12 23:12:44 2020
+++ src/usr.bin/make/dir.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.141 2020/09/12 23:12:44 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.142 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,19 +69,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.141 2020/09/12 23:12:44 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)dir.c	8.2 (Berkeley) 1/2/94";
-#else
-__RCSID("$NetBSD: dir.c,v 1.141 2020/09/12 23:12:44 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * dir.c --
  *	Directory searching using wildcards and/or normal names...
@@ -146,6 +133,8 @@ __RCSID("$NetBSD: dir.c,v 1.141 2020/09/
 #include "dir.h"
 #include "job.h"
 
+/*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
+MAKE_RCSID("$NetBSD: dir.c,v 1.142 2020/09/13 15:15:51 rillig Exp $");
 
 #define DIR_DEBUG0(fmt) \
     if (!DEBUG(DIR)) (void) 0; else fprintf(debug_file, fmt)
Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.141 src/usr.bin/make/make.h:1.142
--- src/usr.bin/make/make.h:1.141	Sun Sep 13 13:50:27 2020
+++ src/usr.bin/make/make.h	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.141 2020/09/13 13:50:27 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.142 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -589,4 +589,13 @@ static inline MAKE_ATTR_UNUSED char ch_t
 static inline MAKE_ATTR_UNUSED char ch_toupper(char ch)
 { return (char)toupper((unsigned char)ch); }
 
+#ifndef MAKE_NATIVE
+#define MAKE_RCSID(id) static volatile char rcsid[] = id
+#else
+#include <sys/cdefs.h>
+#ifndef lint
+#define MAKE_RCSID(id) __RCSID(id)
+#endif
+#endif
+
 #endif /* MAKE_MAKE_H */

Index: src/usr.bin/make/enum.c
diff -u src/usr.bin/make/enum.c:1.7 src/usr.bin/make/enum.c:1.8
--- src/usr.bin/make/enum.c:1.7	Sat Sep 12 14:41:00 2020
+++ src/usr.bin/make/enum.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: enum.c,v 1.7 2020/09/12 14:41:00 rillig Exp $	*/
+/*	$NetBSD: enum.c,v 1.8 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  Copyright (c) 2020 Roland Illig <[email protected]>
@@ -27,20 +27,13 @@
  POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: enum.c,v 1.7 2020/09/12 14:41:00 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: enum.c,v 1.7 2020/09/12 14:41:00 rillig Exp $");
-#endif
-#endif
-
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "enum.h"
+#include "make.h"
+
+MAKE_RCSID("$NetBSD: enum.c,v 1.8 2020/09/13 15:15:51 rillig Exp $");
 
 /* Convert a bitset into a string representation, showing the names of the
  * individual bits.
Index: src/usr.bin/make/strlist.c
diff -u src/usr.bin/make/strlist.c:1.7 src/usr.bin/make/strlist.c:1.8
--- src/usr.bin/make/strlist.c:1.7	Fri Sep 11 04:32:39 2020
+++ src/usr.bin/make/strlist.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: strlist.c,v 1.7 2020/09/11 04:32:39 rillig Exp $	*/
+/*	$NetBSD: strlist.c,v 1.8 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2008 - 2009 The NetBSD Foundation, Inc.
@@ -32,18 +32,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: strlist.c,v 1.7 2020/09/11 04:32:39 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: strlist.c,v 1.7 2020/09/11 04:32:39 rillig Exp $");
-#endif /* not lint */
-#endif
-
 #include "make.h"
 #include "strlist.h"
 
+MAKE_RCSID("$NetBSD: strlist.c,v 1.8 2020/09/13 15:15:51 rillig Exp $");
+
 void
 strlist_init(strlist_t *sl)
 {

Index: src/usr.bin/make/for.c
diff -u src/usr.bin/make/for.c:1.82 src/usr.bin/make/for.c:1.83
--- src/usr.bin/make/for.c:1.82	Sat Sep 12 14:41:00 2020
+++ src/usr.bin/make/for.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.82 2020/09/12 14:41:00 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.83 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -29,19 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: for.c,v 1.82 2020/09/12 14:41:00 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.82 2020/09/12 14:41:00 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * Handling of .for/.endfor loops in a makefile.
  *
@@ -72,6 +59,9 @@ __RCSID("$NetBSD: for.c,v 1.82 2020/09/1
 #include    "make.h"
 #include    "strlist.h"
 
+/*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
+MAKE_RCSID("$NetBSD: for.c,v 1.83 2020/09/13 15:15:51 rillig Exp $");
+
 typedef enum {
     FOR_SUB_ESCAPE_CHAR = 0x0001,
     FOR_SUB_ESCAPE_BRACE = 0x0002,

Index: src/usr.bin/make/hash.c
diff -u src/usr.bin/make/hash.c:1.31 src/usr.bin/make/hash.c:1.32
--- src/usr.bin/make/hash.c:1.31	Sat Sep  5 13:55:08 2020
+++ src/usr.bin/make/hash.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $	*/
+/*	$NetBSD: hash.c,v 1.32 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,19 +69,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)hash.c	8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: hash.c,v 1.31 2020/09/05 13:55:08 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /* hash.c --
  *
  * 	This module contains routines to manipulate a hash table.
@@ -91,6 +78,9 @@ __RCSID("$NetBSD: hash.c,v 1.31 2020/09/
  */
 #include "make.h"
 
+/*	"@(#)hash.c	8.1 (Berkeley) 6/6/93"	*/
+MAKE_RCSID("$NetBSD: hash.c,v 1.32 2020/09/13 15:15:51 rillig Exp $");
+
 /*
  * Forward references to local procedures that are used before they're
  * defined:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.231 src/usr.bin/make/job.c:1.232
--- src/usr.bin/make/job.c:1.231	Sat Sep 12 15:03:40 2020
+++ src/usr.bin/make/job.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.231 2020/09/12 15:03:40 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.232 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -69,19 +69,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.231 2020/09/12 15:03:40 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.231 2020/09/12 15:03:40 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * job.c --
  *	handle the creation etc. of our child processes.
@@ -151,6 +138,10 @@ __RCSID("$NetBSD: job.c,v 1.231 2020/09/
 #include "job.h"
 #include "pathnames.h"
 #include "trace.h"
+
+/*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
+MAKE_RCSID("$NetBSD: job.c,v 1.232 2020/09/13 15:15:51 rillig Exp $");
+
 # define STATIC static
 
 /*

Index: src/usr.bin/make/lst.c
diff -u src/usr.bin/make/lst.c:1.62 src/usr.bin/make/lst.c:1.63
--- src/usr.bin/make/lst.c:1.62	Sat Sep 12 14:41:00 2020
+++ src/usr.bin/make/lst.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.62 2020/09/12 14:41:00 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.63 2020/09/13 15:15:51 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -36,14 +36,7 @@
 
 #include "make.h"
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lst.c,v 1.62 2020/09/12 14:41:00 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: lst.c,v 1.62 2020/09/12 14:41:00 rillig Exp $");
-#endif /* not lint */
-#endif
+MAKE_RCSID("$NetBSD: lst.c,v 1.63 2020/09/13 15:15:51 rillig Exp $");
 
 struct ListNode {
     struct ListNode *prev;	/* previous element in list */

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.336 src/usr.bin/make/main.c:1.337
--- src/usr.bin/make/main.c:1.336	Sun Sep 13 06:15:29 2020
+++ src/usr.bin/make/main.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.336 2020/09/13 06:15:29 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.337 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,24 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.336 2020/09/13 06:15:29 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
- The Regents of the University of California.  All rights reserved.");
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
-#else
-__RCSID("$NetBSD: main.c,v 1.336 2020/09/13 06:15:29 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * main.c --
  *	The main file for this entire program. Exit routines etc
@@ -143,6 +125,13 @@ __RCSID("$NetBSD: main.c,v 1.336 2020/09
 #include <sys/uio.h>
 #endif
 
+/*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
+MAKE_RCSID("$NetBSD: main.c,v 1.337 2020/09/13 15:15:51 rillig Exp $");
+#if defined(MAKE_NATIVE) && !defined(lint)
+__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
+ The Regents of the University of California.  All rights reserved.");
+#endif
+
 #ifndef	DEFMAXLOCAL
 #define	DEFMAXLOCAL DEFMAXJOBS
 #endif

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.135 src/usr.bin/make/make.c:1.136
--- src/usr.bin/make/make.c:1.135	Sat Sep 12 16:38:19 2020
+++ src/usr.bin/make/make.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.135 2020/09/12 16:38:19 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.136 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: make.c,v 1.135 2020/09/12 16:38:19 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)make.c	8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: make.c,v 1.135 2020/09/12 16:38:19 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * make.c --
  *	The functions which perform the examination of targets and
@@ -119,6 +106,9 @@ __RCSID("$NetBSD: make.c,v 1.135 2020/09
 #include    "dir.h"
 #include    "job.h"
 
+/*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
+MAKE_RCSID("$NetBSD: make.c,v 1.136 2020/09/13 15:15:51 rillig Exp $");
+
 static unsigned int checked = 1;/* Sequence # to detect recursion */
 static Lst     	toBeMade;	/* The current fringe of the graph. These
 				 * are nodes which await examination by

Index: src/usr.bin/make/make_malloc.c
diff -u src/usr.bin/make/make_malloc.c:1.18 src/usr.bin/make/make_malloc.c:1.19
--- src/usr.bin/make/make_malloc.c:1.18	Wed Sep  2 06:10:44 2020
+++ src/usr.bin/make/make_malloc.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make_malloc.c,v 1.18 2020/09/02 06:10:44 rillig Exp $	*/
+/*	$NetBSD: make_malloc.c,v 1.19 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -26,11 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifdef MAKE_NATIVE
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: make_malloc.c,v 1.18 2020/09/02 06:10:44 rillig Exp $");
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -38,6 +33,8 @@ __RCSID("$NetBSD: make_malloc.c,v 1.18 2
 
 #include "make.h"
 
+MAKE_RCSID("$NetBSD: make_malloc.c,v 1.19 2020/09/13 15:15:51 rillig Exp $");
+
 #ifndef USE_EMALLOC
 static MAKE_ATTR_DEAD void enomem(void);
 

Index: src/usr.bin/make/metachar.c
diff -u src/usr.bin/make/metachar.c:1.6 src/usr.bin/make/metachar.c:1.7
--- src/usr.bin/make/metachar.c:1.6	Mon Aug  3 20:43:41 2020
+++ src/usr.bin/make/metachar.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: metachar.c,v 1.6 2020/08/03 20:43:41 rillig Exp $	*/
+/*	$NetBSD: metachar.c,v 1.7 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -37,11 +37,10 @@
 #include <sys/cdefs.h>
 #endif
 
-#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: metachar.c,v 1.6 2020/08/03 20:43:41 rillig Exp $");
-#endif
-
 #include "metachar.h"
+
+MAKE_RCSID("$NetBSD: metachar.c,v 1.7 2020/09/13 15:15:51 rillig Exp $");
+
 /*
  * The following array is used to make a fast determination of which
  * characters are interpreted specially by the shell.  If a command

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.302 src/usr.bin/make/parse.c:1.303
--- src/usr.bin/make/parse.c:1.302	Sun Sep 13 13:50:27 2020
+++ src/usr.bin/make/parse.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.302 2020/09/13 13:50:27 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.303 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.302 2020/09/13 13:50:27 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.302 2020/09/13 13:50:27 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * parse.c --
  *	Functions to parse a makefile.
@@ -143,6 +130,9 @@ __RCSID("$NetBSD: parse.c,v 1.302 2020/0
 #include "job.h"
 #include "pathnames.h"
 
+/*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
+MAKE_RCSID("$NetBSD: parse.c,v 1.303 2020/09/13 15:15:51 rillig Exp $");
+
 /* types and constants */
 
 /*

Index: src/usr.bin/make/str.c
diff -u src/usr.bin/make/str.c:1.64 src/usr.bin/make/str.c:1.65
--- src/usr.bin/make/str.c:1.64	Sun Aug 30 19:56:02 2020
+++ src/usr.bin/make/str.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.c,v 1.64 2020/08/30 19:56:02 rillig Exp $	*/
+/*	$NetBSD: str.c,v 1.65 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,21 +68,11 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: str.c,v 1.64 2020/08/30 19:56:02 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char     sccsid[] = "@(#)str.c	5.8 (Berkeley) 6/1/90";
-#else
-__RCSID("$NetBSD: str.c,v 1.64 2020/08/30 19:56:02 rillig Exp $");
-#endif
-#endif				/* not lint */
-#endif
-
 #include "make.h"
 
+/*	"@(#)str.c	5.8 (Berkeley) 6/1/90"	*/
+MAKE_RCSID("$NetBSD: str.c,v 1.65 2020/09/13 15:15:51 rillig Exp $");
+
 /* Return the concatenation of s1 and s2, freshly allocated. */
 char *
 str_concat2(const char *s1, const char *s2)

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.154 src/usr.bin/make/suff.c:1.155
--- src/usr.bin/make/suff.c:1.154	Sun Sep 13 06:15:29 2020
+++ src/usr.bin/make/suff.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.154 2020/09/13 06:15:29 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.155 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.154 2020/09/13 06:15:29 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.154 2020/09/13 06:15:29 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * suff.c --
  *	Functions to maintain suffix lists and find implicit dependents
@@ -138,6 +125,9 @@ __RCSID("$NetBSD: suff.c,v 1.154 2020/09
 #include	  "make.h"
 #include	  "dir.h"
 
+/*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
+MAKE_RCSID("$NetBSD: suff.c,v 1.155 2020/09/13 15:15:51 rillig Exp $");
+
 #define SUFF_DEBUG0(fmt) \
     if (!DEBUG(SUFF)) (void) 0; else fprintf(debug_file, fmt)
 

Index: src/usr.bin/make/targ.c
diff -u src/usr.bin/make/targ.c:1.87 src/usr.bin/make/targ.c:1.88
--- src/usr.bin/make/targ.c:1.87	Sat Sep 12 16:38:19 2020
+++ src/usr.bin/make/targ.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: targ.c,v 1.87 2020/09/12 16:38:19 rillig Exp $	*/
+/*	$NetBSD: targ.c,v 1.88 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: targ.c,v 1.87 2020/09/12 16:38:19 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)targ.c	8.2 (Berkeley) 3/19/94";
-#else
-__RCSID("$NetBSD: targ.c,v 1.87 2020/09/12 16:38:19 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * targ.c --
  *	Functions for maintaining the Lst allTargets. Target nodes are
@@ -134,6 +121,9 @@ __RCSID("$NetBSD: targ.c,v 1.87 2020/09/
 #include	  "make.h"
 #include	  "dir.h"
 
+/*	"@(#)targ.c	8.2 (Berkeley) 3/19/94"	*/
+MAKE_RCSID("$NetBSD: targ.c,v 1.88 2020/09/13 15:15:51 rillig Exp $");
+
 static Lst        allTargets;	/* the list of all targets found so far */
 #ifdef CLEANUP
 static Lst	  allGNs;	/* List of all the GNodes */

Index: src/usr.bin/make/trace.c
diff -u src/usr.bin/make/trace.c:1.15 src/usr.bin/make/trace.c:1.16
--- src/usr.bin/make/trace.c:1.15	Mon Aug  3 20:26:09 2020
+++ src/usr.bin/make/trace.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trace.c,v 1.15 2020/08/03 20:26:09 rillig Exp $	*/
+/*	$NetBSD: trace.c,v 1.16 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -29,16 +29,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: trace.c,v 1.15 2020/08/03 20:26:09 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: trace.c,v 1.15 2020/08/03 20:26:09 rillig Exp $");
-#endif /* not lint */
-#endif
-
 /*-
  * trace.c --
  *	handle logging of trace events generated by various parts of make.
@@ -61,6 +51,8 @@ __RCSID("$NetBSD: trace.c,v 1.15 2020/08
 #include "job.h"
 #include "trace.h"
 
+MAKE_RCSID("$NetBSD: trace.c,v 1.16 2020/09/13 15:15:51 rillig Exp $");
+
 static FILE *trfile;
 static pid_t trpid;
 const char *trwd;

Index: src/usr.bin/make/util.c
diff -u src/usr.bin/make/util.c:1.59 src/usr.bin/make/util.c:1.60
--- src/usr.bin/make/util.c:1.59	Sat Sep 12 16:46:24 2020
+++ src/usr.bin/make/util.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $	*/
+/*	$NetBSD: util.c,v 1.60 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Missing stuff from OS's
@@ -7,15 +7,6 @@
 #include <signal.h>
 #endif
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $";
-#else
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.59 2020/09/12 16:46:24 rillig Exp $");
-#endif
-#endif
-
 #include <sys/param.h>
 
 #include <errno.h>
@@ -25,6 +16,8 @@ __RCSID("$NetBSD: util.c,v 1.59 2020/09/
 
 #include "make.h"
 
+MAKE_RCSID("$NetBSD: util.c,v 1.60 2020/09/13 15:15:51 rillig Exp $");
+
 #if !defined(MAKE_NATIVE) && !defined(HAVE_STRERROR)
 extern int errno, sys_nerr;
 extern char *sys_errlist[];
@@ -463,6 +456,7 @@ strftime(char *buf, size_t len, const ch
 		buf += s;
 		len -= s;
 	}
+	return buf - b;
 }
 #endif
 #endif

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.511 src/usr.bin/make/var.c:1.512
--- src/usr.bin/make/var.c:1.511	Sun Sep 13 13:50:27 2020
+++ src/usr.bin/make/var.c	Sun Sep 13 15:15:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.511 2020/09/13 13:50:27 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.512 2020/09/13 15:15:51 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -68,19 +68,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.511 2020/09/13 13:50:27 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.511 2020/09/13 13:50:27 rillig Exp $");
-#endif
-#endif /* not lint */
-#endif
-
 /*-
  * var.c --
  *	Variable-handling functions
@@ -133,6 +120,9 @@ __RCSID("$NetBSD: var.c,v 1.511 2020/09/
 #include    "job.h"
 #include    "metachar.h"
 
+/*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
+MAKE_RCSID("$NetBSD: var.c,v 1.512 2020/09/13 15:15:51 rillig Exp $");
+
 #define VAR_DEBUG_IF(cond, fmt, ...)	\
     if (!(DEBUG(VAR) && (cond)))	\
 	(void) 0;			\

Reply via email to