Module Name: src Committed By: rillig Date: Sun Jan 1 19:10:58 UTC 2023
Modified Files: src/usr.bin/make: make.1 Log Message: make.1: sync list of built-in variables with reality Fixes PR 57029. To generate a diff of this commit: cvs rdiff -u -r1.354 -r1.355 src/usr.bin/make/make.1 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.1 diff -u src/usr.bin/make/make.1:1.354 src/usr.bin/make/make.1:1.355 --- src/usr.bin/make/make.1:1.354 Sun Jan 1 17:27:40 2023 +++ src/usr.bin/make/make.1 Sun Jan 1 19:10:58 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.354 2023/01/01 17:27:40 rillig Exp $ +.\" $NetBSD: make.1,v 1.355 2023/01/01 19:10:58 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -843,6 +843,10 @@ In addition, sets or knows about the following variables: .Bl -tag .\" NB: This list is sorted case-insensitive, ignoring punctuation. +.\" NB: To find all built-in variables in make's source code, +.\" NB: search for Var_*, Global_*, SetVarObjdir, GetBooleanExpr, +.\" NB: and the implementation of Var_SetWithFlags. +.\" NB: Last synced on 2023-01-01. .It Va .ALLTARGETS The list of all targets encountered in the makefiles. If evaluated during makefile parsing, @@ -854,28 +858,55 @@ was executed. Refer to the description of .Sq Va PWD for more details. +.It Va .ERROR_CMD +Is used in error handling, see +.Va MAKE_PRINT_VAR_ON_ERROR . +.It Va .ERROR_CWD +Is used in error handling, see +.Va MAKE_PRINT_VAR_ON_ERROR . +.It Va .ERROR_META_FILE +Is used in error handling in +.Dq meta +mode, see +.Va MAKE_PRINT_VAR_ON_ERROR . +.It Va .ERROR_TARGET +Is used in error handling, see +.Va MAKE_PRINT_VAR_ON_ERROR . .It Va .INCLUDEDFROMDIR The directory of the file this makefile was included from. .It Va .INCLUDEDFROMFILE The filename of the file this makefile was included from. +.\" .INCLUDES is intentionally undocumented, as it is obsolete. +.\" .LIBS is intentionally undocumented, as it is obsolete. +.It Va MACHINE +The machine hardware name, see +.Xr uname 1 . +.It Va MACHINE_ARCH +The machine processor architecture name, see +.Xr uname 1 . .It Va MAKE The name that .Nm was executed with .Pq Va argv[0] . -For compatibility, -.Nm -also sets -.Va .MAKE -to the same value. +.It Va .MAKE +The same as +.Va MAKE , +for compatibility. The preferred variable to use is the environment variable .Ev MAKE because it is more compatible with other make variants and cannot be confused with the special target with the same name. +.\" '.MAKE.cmd_filtered' is intentionally undocumented, +.\" as it is an internal implementation detail. .It Va .MAKE.DEPENDFILE Names the makefile (default .Sq Pa .depend ) from which generated dependencies are read. +.It Va .MAKE.DIE_QUIETLY +If set to +.Dl true , +do not print error information at the end. .It Va .MAKE.EXPAND_VARIABLES A boolean that controls the default behavior of the .Fl V @@ -887,7 +918,10 @@ include additional unexpanded variable r .It Va .MAKE.EXPORTED The list of variables exported by .Nm . -.It Va MAKEFLAGS +.It Va MAKEFILE +The top-level makefile that is currently read, +as given in the command line. +.It Va .MAKEFLAGS The environment variable .Sq Ev MAKEFLAGS may contain anything that @@ -897,7 +931,7 @@ command line. Anything specified on .Nm Ns 's command line is appended to the -.Va MAKEFLAGS +.Va .MAKEFLAGS variable, which is then added to the environment for all programs that .Nm executes. @@ -937,6 +971,9 @@ This allows tests like: .Li .if ${.MAKE.LEVEL} == 0 to protect things which should only be evaluated in the top-level instance of .Nm . +.It Va .MAKE.LEVEL.ENV +The name of the environment variable that stores the level of nested calls to +.Nm . .It Va .MAKE.MAKEFILE_PREFERENCE The ordered list of makefile names (default @@ -1078,6 +1115,19 @@ In both compat and parallel mode, do not but instead randomize their order. This mode can be used to detect undeclared dependencies between files. .El +.It Va MAKEOBJDIR +Used to create files in a separate directory, see +.Va .OBJDIR . +.It Va MAKE_OBJDIR_CHECK_WRITABLE +Used to force a separate directory for the created files, +even if that directory is not writable, see +.Va .OBJDIR . +.It Va MAKEOBJDIRPREFIX +Used to create files in a separate directory, see +.Va .OBJDIR . +.It Va .MAKE.OS +The name of the operating system, see +.Xr uname 1 . .It Va .MAKEOVERRIDES This variable is used to record the names of variables assigned to on the command line, so that they may be exported as part of @@ -1146,6 +1196,15 @@ treated as normal sources. .It Va .MAKE.UID The numeric ID of the user running .Nm . +.\" 'MAKE_VERSION' is intentionally undocumented +.\" since it is only defined in the bmake distribution, +.\" but not in NetBSD's native make. +.\" '.meta.%d.lcwd' is intentionally undocumented +.\" since it is an internal implementation detail. +.\" '.meta.%d.ldir' is intentionally undocumented +.\" since it is an internal implementation detail. +.\" 'MFLAGS' is intentionally undocumented +.\" since it is obsolete. .It Va .newline This variable is simply assigned a newline character as its value. This allows expansions using the @@ -1228,6 +1287,12 @@ searches for files. To update this search list, use the special target .Sq Ic .PATH rather than modifying the variable directly. +.It Va %POSIX +Is set in POSIX mode, see the special +.Ql Va .POSIX +target. +.\" XXX: There is no make variable named 'PWD', +.\" XXX: make only reads and writes the environment variable 'PWD'. .It Va PWD Alternate path to the current directory. .Nm