Module Name:    src
Committed By:   rillig
Date:           Wed Nov  4 13:22:15 UTC 2020

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

Log Message:
make(1): rename MAKEFILE_PREFERENCE for consistency

The names of the other special variables are all prefixed with MAKE_.


To generate a diff of this commit:
cvs rdiff -u -r1.423 -r1.424 src/usr.bin/make/main.c
cvs rdiff -u -r1.184 -r1.185 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/main.c
diff -u src/usr.bin/make/main.c:1.423 src/usr.bin/make/main.c:1.424
--- src/usr.bin/make/main.c:1.423	Wed Nov  4 04:49:32 2020
+++ src/usr.bin/make/main.c	Wed Nov  4 13:22:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.423 2020/11/04 04:49:32 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.424 2020/11/04 13:22:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.423 2020/11/04 04:49:32 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.424 2020/11/04 13:22:15 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	    "The Regents of the University of California.  "
@@ -1272,7 +1272,7 @@ ReadMakefiles(void)
 		}
 	} else {
 		char *p1;
-		(void)Var_Subst("${" MAKEFILE_PREFERENCE "}",
+		(void)Var_Subst("${" MAKE_MAKEFILE_PREFERENCE "}",
 				VAR_CMDLINE, VARE_WANTRES, &p1);
 		/* TODO: handle errors */
 		(void)str2Lst_Append(opts.makefiles, p1, NULL);
@@ -1395,7 +1395,7 @@ main(int argc, char **argv)
 #ifndef MAKEFILE_PREFERENCE_LIST
 # define MAKEFILE_PREFERENCE_LIST "makefile Makefile"
 #endif
-	Var_Set(MAKEFILE_PREFERENCE, MAKEFILE_PREFERENCE_LIST,
+	Var_Set(MAKE_MAKEFILE_PREFERENCE, MAKEFILE_PREFERENCE_LIST,
 		VAR_GLOBAL);
 	Var_Set(MAKE_DEPENDFILE, ".depend", VAR_GLOBAL);
 

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.184 src/usr.bin/make/make.h:1.185
--- src/usr.bin/make/make.h:1.184	Wed Nov  4 13:04:56 2020
+++ src/usr.bin/make/make.h	Wed Nov  4 13:22:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.184 2020/11/04 13:04:56 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.185 2020/11/04 13:22:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -475,7 +475,7 @@ extern pid_t	myPid;
 #define	MAKE_EXPORTED	".MAKE.EXPORTED"   /* variables we export */
 #define	MAKE_MAKEFILES	".MAKE.MAKEFILES"  /* all makefiles already loaded */
 #define	MAKE_LEVEL	".MAKE.LEVEL"	   /* recursion level */
-#define MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE"
+#define MAKE_MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE"
 #define MAKE_DEPENDFILE	".MAKE.DEPENDFILE" /* .depend */
 #define MAKE_MODE	".MAKE.MODE"
 #ifndef MAKE_LEVEL_ENV

Reply via email to