Module Name:    src
Committed By:   rillig
Date:           Wed Dec 23 14:03:13 UTC 2020

Modified Files:
        src/usr.bin/make: make.h

Log Message:
make(1): fix MAKE_RCSID for lint mode

Previously, running lint mode didn't define MAKE_RCSID at all, which
resulted in a syntax error.

While here, reduced the indentation and nesting of the preprocessor
directives.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/usr.bin/make/make.h

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/make.h
diff -u src/usr.bin/make/make.h:1.237 src/usr.bin/make/make.h:1.238
--- src/usr.bin/make/make.h:1.237	Wed Dec 23 13:50:54 2020
+++ src/usr.bin/make/make.h	Wed Dec 23 14:03:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.237 2020/12/23 13:50:54 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.238 2020/12/23 14:03:13 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -831,19 +831,17 @@ pp_skip_hspace(char **pp)
 		(*pp)++;
 }
 
-#ifdef MAKE_NATIVE
+#if defined(lint)
+#  define MAKE_RCSID(id) extern void do_not_define_rcsid(void)
+#elif defined(MAKE_NATIVE)
 #  include <sys/cdefs.h>
-#  ifndef lint
-#    define MAKE_RCSID(id) __RCSID(id)
-#  endif
-#elif defined(MAKE_ALL_IN_ONE)
-#  if defined(__COUNTER__)
-#    define MAKE_RCSID_CONCAT(x, y) CONCAT(x, y)
-#    define MAKE_RCSID(id) static volatile char \
+#  define MAKE_RCSID(id) __RCSID(id)
+#elif defined(MAKE_ALL_IN_ONE) && defined(__COUNTER__)
+#  define MAKE_RCSID_CONCAT(x, y) CONCAT(x, y)
+#  define MAKE_RCSID(id) static volatile char \
 	MAKE_RCSID_CONCAT(rcsid_, __COUNTER__)[] = id
-#  else
-#    define MAKE_RCSID(id) extern void do_not_define_rcsid(void)
-#  endif
+#elif defined(MAKE_ALL_IN_ONE)
+#  define MAKE_RCSID(id) extern void do_not_define_rcsid(void)
 #else
 #  define MAKE_RCSID(id) static volatile char rcsid[] = id
 #endif

Reply via email to