Fri Sep 9 06:23:36 2022 UTC ()
make.1: clean up and make the description more accurate

Most changes are editorial.  Notable exceptions are:

The ':Q' in MAKE_PRINT_VAR_ON_ERROR was wrongly added in the previous
commit.  As that variable does not produce a shell command, there is no
point in quoting the characters.

Since 2012.10.07.19.17.31, make doesn't complain anymore if a shell
command in compat mode expands to an empty string, which removes the
need to "keep make happy".


(rillig)
diff -r1.338 -r1.339 src/usr.bin/make/make.1

cvs diff -r1.338 -r1.339 src/usr.bin/make/make.1 (expand / switch to unified diff)

--- src/usr.bin/make/make.1 2022/09/09 05:27:32 1.338
+++ src/usr.bin/make/make.1 2022/09/09 06:23:36 1.339
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: make.1,v 1.338 2022/09/09 05:27:32 rillig Exp $ 1.\" $NetBSD: make.1,v 1.339 2022/09/09 06:23:36 rillig Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1993 3.\" Copyright (c) 1990, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -846,35 +846,34 @@ A path to the directory where @@ -846,35 +846,34 @@ A path to the directory where
846was executed. 846was executed.
847Refer to the description of 847Refer to the description of
848.Sq Va PWD 848.Sq Va PWD
849for more details. 849for more details.
850.It Va .INCLUDEDFROMDIR 850.It Va .INCLUDEDFROMDIR
851The directory of the file this Makefile was included from. 851The directory of the file this Makefile was included from.
852.It Va .INCLUDEDFROMFILE 852.It Va .INCLUDEDFROMFILE
853The filename of the file this Makefile was included from. 853The filename of the file this Makefile was included from.
854.It Va MAKE 854.It Va MAKE
855The name that 855The name that
856.Nm 856.Nm
857was executed with 857was executed with
858.Pq Va argv[0] . 858.Pq Va argv[0] .
859For compatibility 859For compatibility,
860.Nm 860.Nm
861also sets 861also sets
862.Va .MAKE 862.Va .MAKE
863with the same value. 863with the same value.
864The preferred variable to use is the environment variable 864The preferred variable to use is the environment variable
865.Ev MAKE 865.Ev MAKE
866because it is more compatible with other versions of 866because it is more compatible with other make variants
867.Nm 
868and cannot be confused with the special target with the same name. 867and cannot be confused with the special target with the same name.
869.It Va .MAKE.DEPENDFILE 868.It Va .MAKE.DEPENDFILE
870Names the makefile (default 869Names the makefile (default
871.Sq Pa .depend ) 870.Sq Pa .depend )
872from which generated dependencies are read. 871from which generated dependencies are read.
873.It Va .MAKE.EXPAND_VARIABLES 872.It Va .MAKE.EXPAND_VARIABLES
874A boolean that controls the default behavior of the 873A boolean that controls the default behavior of the
875.Fl V 874.Fl V
876option. 875option.
877If true, variable values printed with 876If true, variable values printed with
878.Fl V 877.Fl V
879are fully expanded; if false, the raw variable contents (which may 878are fully expanded; if false, the raw variable contents (which may
880include additional unexpanded variable references) are shown. 879include additional unexpanded variable references) are shown.
@@ -910,82 +909,80 @@ If set to @@ -910,82 +909,80 @@ If set to
910apparent variable assignments in dependency lines are 909apparent variable assignments in dependency lines are
911treated as normal sources. 910treated as normal sources.
912.It Va MAKEFLAGS 911.It Va MAKEFLAGS
913The environment variable 912The environment variable
914.Sq Ev MAKEFLAGS 913.Sq Ev MAKEFLAGS
915may contain anything that 914may contain anything that
916may be specified on 915may be specified on
917.Nm Ns 's 916.Nm Ns 's
918command line. 917command line.
919Anything specified on 918Anything specified on
920.Nm Ns 's 919.Nm Ns 's
921command line is appended to the 920command line is appended to the
922.Va MAKEFLAGS 921.Va MAKEFLAGS
923variable which is then 922variable, which is then added to the environment for all programs that
924entered into the environment for all programs which 
925.Nm 923.Nm
926executes. 924executes.
927.It Va .MAKE.LEVEL 925.It Va .MAKE.LEVEL
928The recursion depth of 926The recursion depth of
929.Nm . 927.Nm .
930The initial instance of 928The top-level instance of
931.Nm 929.Nm
932is 0, and an incremented value is put into the environment 930has level 0, and each child make has its parent level plus 1.
933to be seen by the next generation. 
934This allows tests like: 931This allows tests like:
935.Li .if ${.MAKE.LEVEL} == 0 932.Li .if ${.MAKE.LEVEL} == 0
936to protect things which should only be evaluated in the initial instance of 933to protect things which should only be evaluated in the top-level instance of
937.Nm . 934.Nm .
938.It Va .MAKE.MAKEFILE_PREFERENCE 935.It Va .MAKE.MAKEFILE_PREFERENCE
939The ordered list of makefile names 936The ordered list of makefile names
940(default 937(default
941.Sq Pa makefile , 938.Sq Pa makefile ,
942.Sq Pa Makefile ) 939.Sq Pa Makefile )
943that 940that
944.Nm 941.Nm
945looks for. 942looks for.
946.It Va .MAKE.MAKEFILES 943.It Va .MAKE.MAKEFILES
947The list of makefiles read by 944The list of makefiles read by
948.Nm , 945.Nm ,
949which is useful for tracking dependencies. 946which is useful for tracking dependencies.
950Each makefile is recorded only once, regardless of the number of times read. 947Each makefile is recorded only once, regardless of the number of times read.
951.It Va .MAKE.MODE 948.It Va .MAKE.MODE
952Processed after reading all makefiles. 949Processed after reading all makefiles.
953Can affect the mode that 950Affects the mode that
954.Nm 951.Nm
955runs in. 952runs in.
956It can contain a number of keywords: 953It can contain a number of keywords:
957.Bl -hang -width missing-filemon=bf. 954.Bl -hang -width missing-filemon=bf.
958.It Cm compat 955.It Cm compat
959Like 956Like
960.Fl B , 957.Fl B ,
961puts 958puts
962.Nm 959.Nm
963into 960into
964.Dq compat 961.Dq compat
965mode. 962mode.
966.It Cm meta 963.It Cm meta
967Puts 964Puts
968.Nm 965.Nm
969into 966into
970.Dq meta 967.Dq meta
971mode, where meta files are created for each target 968mode, where meta files are created for each target
972to capture the command run, the output generated and if 969to capture the command run, the output generated, and if
973.Xr filemon 4 970.Xr filemon 4
974is available, the system calls which are of interest to 971is available, the system calls which are of interest to
975.Nm . 972.Nm .
976The captured output can be very useful when diagnosing errors. 973The captured output can be useful when diagnosing errors.
977.It Cm curdirOk= Ns Ar bf 974.It Cm curdirOk= Ns Ar bf
978Normally 975By default,
979.Nm 976.Nm
980does not create 977does not create
981.Pa .meta 978.Pa .meta
982files in 979files in
983.Sq Va .CURDIR . 980.Sq Va .CURDIR .
984This can be overridden by setting 981This can be overridden by setting
985.Va bf 982.Va bf
986to a value which represents true. 983to a value which represents true.
987.It Cm missing-meta= Ns Ar bf 984.It Cm missing-meta= Ns Ar bf
988If 985If
989.Va bf 986.Va bf
990is true, a missing 987is true, a missing
991.Pa .meta 988.Pa .meta
@@ -1140,27 +1137,27 @@ and @@ -1140,27 +1137,27 @@ and
1140to the path of the meta file (if any) describing the failed target. 1137to the path of the meta file (if any) describing the failed target.
1141It then prints its name and the value of 1138It then prints its name and the value of
1142.Sq Va .CURDIR 1139.Sq Va .CURDIR
1143as well as the value of any variables named in 1140as well as the value of any variables named in
1144.Sq Va MAKE_PRINT_VAR_ON_ERROR . 1141.Sq Va MAKE_PRINT_VAR_ON_ERROR .
1145.It Va .newline 1142.It Va .newline
1146This variable is simply assigned a newline character as its value. 1143This variable is simply assigned a newline character as its value.
1147This allows expansions using the 1144This allows expansions using the
1148.Cm \&:@ 1145.Cm \&:@
1149modifier to put a newline between 1146modifier to put a newline between
1150iterations of the loop rather than a space. 1147iterations of the loop rather than a space.
1151For example, the printing of 1148For example, the printing of
1152.Sq Va MAKE_PRINT_VAR_ON_ERROR 1149.Sq Va MAKE_PRINT_VAR_ON_ERROR
1153could be done as ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v:Q}'${.newline}@}. 1150could be done as ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}.
1154.It Va .OBJDIR 1151.It Va .OBJDIR
1155A path to the directory where the targets are built. 1152A path to the directory where the targets are built.
1156Its value is determined by trying to 1153Its value is determined by trying to
1157.Xr chdir 2 1154.Xr chdir 2
1158to the following directories in order and using the first match: 1155to the following directories in order and using the first match:
1159.Bl -enum 1156.Bl -enum
1160.It 1157.It
1161.Ev ${MAKEOBJDIRPREFIX}${.CURDIR} 1158.Ev ${MAKEOBJDIRPREFIX}${.CURDIR}
1162.Pp 1159.Pp
1163(Only if 1160(Only if
1164.Sq Ev MAKEOBJDIRPREFIX 1161.Sq Ev MAKEOBJDIRPREFIX
1165is set in the environment or on the command line.) 1162is set in the environment or on the command line.)
1166.It 1163.It
@@ -1196,42 +1193,42 @@ changes to the specified directory if it @@ -1196,42 +1193,42 @@ changes to the specified directory if it
1196and 1193and
1197.Sq Va PWD 1194.Sq Va PWD
1198to that directory before executing any targets. 1195to that directory before executing any targets.
1199.Pp 1196.Pp
1200Except in the case of an explicit 1197Except in the case of an explicit
1201.Sq Ic .OBJDIR 1198.Sq Ic .OBJDIR
1202target, 1199target,
1203.Nm 1200.Nm
1204checks that the specified directory is writable and ignores it if not. 1201checks that the specified directory is writable and ignores it if not.
1205This check can be skipped by setting the environment variable 1202This check can be skipped by setting the environment variable
1206.Sq Ev MAKE_OBJDIR_CHECK_WRITABLE 1203.Sq Ev MAKE_OBJDIR_CHECK_WRITABLE
1207to "no". 1204to "no".
1208.It Va .PARSEDIR 1205.It Va .PARSEDIR
1209A path to the directory of the current makefile being parsed. 1206The directory name of the current makefile being parsed.
1210.It Va .PARSEFILE 1207.It Va .PARSEFILE
1211The basename of the current makefile being parsed. 1208The basename of the current makefile being parsed.
1212This variable and 1209This variable and
1213.Sq Va .PARSEDIR 1210.Sq Va .PARSEDIR
1214are both set only while the makefiles are being parsed. 1211are both set only while the makefiles are being parsed.
1215If you want to retain their current values, assign them to a variable 1212To retain their current values,
1216using assignment with expansion 1213assign them to a variable using assignment with expansion
1217.Sq Cm \&:= . 1214.Sq Cm \&:= .
1218.It Va .PATH 1215.It Va .PATH
1219The space-separated list of directories that 1216The space-separated list of directories that
1220.Nm 1217.Nm
1221searches for files. 1218searches for files.
1222The search list should be updated using the target 1219To update this search list, use the special target
1223.Sq Ic .PATH 1220.Sq Ic .PATH
1224rather than the variable. 1221rather than modifying the variable directly.
1225.It Va PWD 1222.It Va PWD
1226Alternate path to the current directory. 1223Alternate path to the current directory.
1227.Nm 1224.Nm
1228normally sets 1225normally sets
1229.Sq Va .CURDIR 1226.Sq Va .CURDIR
1230to the canonical path given by 1227to the canonical path given by
1231.Xr getcwd 3 . 1228.Xr getcwd 3 .
1232However, if the environment variable 1229However, if the environment variable
1233.Sq Ev PWD 1230.Sq Ev PWD
1234is set and gives a path to the current directory, 1231is set and gives a path to the current directory,
1235.Nm 1232.Nm
1236sets 1233sets
1237.Sq Va .CURDIR 1234.Sq Va .CURDIR
@@ -1248,29 +1245,29 @@ is set to the value of @@ -1248,29 +1245,29 @@ is set to the value of
1248.Sq Va .OBJDIR 1245.Sq Va .OBJDIR
1249for all programs which 1246for all programs which
1250.Nm 1247.Nm
1251executes. 1248executes.
1252.It Va .SHELL 1249.It Va .SHELL
1253The pathname of the shell used to run target scripts. 1250The pathname of the shell used to run target scripts.
1254It is read-only. 1251It is read-only.
1255.It Va .SUFFIXES 1252.It Va .SUFFIXES
1256The list of known suffixes. 1253The list of known suffixes.
1257It is read-only. 1254It is read-only.
1258.It Va .TARGETS 1255.It Va .TARGETS
1259The list of targets explicitly specified on the command line, if any. 1256The list of targets explicitly specified on the command line, if any.
1260.It Va VPATH 1257.It Va VPATH
1261Colon-separated 1258The colon-separated
1262.Pq Dq \&: 1259.Pq Dq \&:
1263lists of directories that 1260list of directories that
1264.Nm 1261.Nm
1265searches for files. 1262searches for files.
1266The variable is supported for compatibility with old make programs only, 1263The variable is supported for compatibility with old make programs only,
1267use 1264use
1268.Sq Va .PATH 1265.Sq Va .PATH
1269instead. 1266instead.
1270.El 1267.El
1271.Ss Variable modifiers 1268.Ss Variable modifiers
1272The general format of a variable expansion is: 1269The general format of a variable expansion is:
1273.Pp 1270.Pp
1274.Sm off 1271.Sm off
1275.D1 Ic \&${ Ar variable\| Oo Ic \&: Ar modifier\| Oo Ic \&: Ar ... Oc Oc Ic \&} 1272.D1 Ic \&${ Ar variable\| Oo Ic \&: Ar modifier\| Oo Ic \&: Ar ... Oc Oc Ic \&}
1276.Sm on 1273.Sm on
@@ -1287,27 +1284,26 @@ A list of indirect modifiers can be spec @@ -1287,27 +1284,26 @@ A list of indirect modifiers can be spec
1287.Ic \&${ Ar variable Ic \&:${ Ar modifier_variable Ic \&} Oo Ic \&: Ar ... Oc Ic \&} 1284.Ic \&${ Ar variable Ic \&:${ Ar modifier_variable Ic \&} Oo Ic \&: Ar ... Oc Ic \&}
1288.Sm on 1285.Sm on
1289.Ed 1286.Ed
1290.Pp 1287.Pp
1291In this case, the first modifier in the 1288In this case, the first modifier in the
1292.Ar modifier_variable 1289.Ar modifier_variable
1293does not start with a colon, 1290does not start with a colon,
1294since that colon already occurs in the referencing variable. 1291since that colon already occurs in the referencing variable.
1295If any of the modifiers in the 1292If any of the modifiers in the
1296.Ar modifier_variable 1293.Ar modifier_variable
1297contains a dollar sign 1294contains a dollar sign
1298.Pq Ql $ , 1295.Pq Ql $ ,
1299these must be doubled to avoid early expansion. 1296these must be doubled to avoid early expansion.
1300.\" XXX: This is only close to the truth, see the table in varmod.mk. 
1301.Pp 1297.Pp
1302Some modifiers interpret the expression value as a single string, 1298Some modifiers interpret the expression value as a single string,
1303others treat the expression value as a whitespace-separated list of words. 1299others treat the expression value as a whitespace-separated list of words.
1304When splitting a string into words, 1300When splitting a string into words,
1305whitespace can be escaped using double quotes, single quotes and backslashes, 1301whitespace can be escaped using double quotes, single quotes and backslashes,
1306like in the shell. 1302like in the shell.
1307The quotes and backslashes are retained in the words. 1303The quotes and backslashes are retained in the words.
1308.Pp 1304.Pp
1309The supported modifiers are: 1305The supported modifiers are:
1310.Bl -tag -width EEE 1306.Bl -tag -width EEE
1311.It Cm \&:E 1307.It Cm \&:E
1312Replaces each word in the variable with its suffix. 1308Replaces each word in the variable with its suffix.
1313.It Cm \&:H 1309.It Cm \&:H
@@ -1410,34 +1406,34 @@ value is not provided or is 0, the curre @@ -1410,34 +1406,34 @@ value is not provided or is 0, the curre
1410.It Cm \&:hash 1406.It Cm \&:hash
1411Computes a 32-bit hash of the value and encodes it as 8 hex digits. 1407Computes a 32-bit hash of the value and encodes it as 8 hex digits.
1412.It Cm \&:localtime Ns Oo Cm = Ns Ar timestamp Oc 1408.It Cm \&:localtime Ns Oo Cm = Ns Ar timestamp Oc
1413The value is interpreted as a format string for 1409The value is interpreted as a format string for
1414.Xr strftime 3 , 1410.Xr strftime 3 ,
1415using 1411using
1416.Xr localtime 3 , 1412.Xr localtime 3 ,
1417producing the formatted timestamp. 1413producing the formatted timestamp.
1418If a 1414If a
1419.Ar timestamp 1415.Ar timestamp
1420value is not provided or is 0, the current time is used. 1416value is not provided or is 0, the current time is used.
1421.It Cm \&:tA 1417.It Cm \&:tA
1422Attempts to convert the value to an absolute path using 1418Attempts to convert the value to an absolute path using
1423.Xr realpath 3 , 1419.Xr realpath 3 .
1424if that fails, the value is unchanged. 1420If that fails, the value is unchanged.
1425.It Cm \&:tl 1421.It Cm \&:tl
1426Converts the value to lower-case letters. 1422Converts the value to lower-case letters.
1427.It Cm \&:ts Ns Ar c 1423.It Cm \&:ts Ns Ar c
1428When joining the words after a modifier that treats the value as words, 1424When joining the words after a modifier that treats the value as words,
1429the words are normally separated by a space. 1425the words are normally separated by a space.
1430This modifier sets the separator to the character 1426This modifier changes the separator to the character
1431.Ar c . 1427.Ar c .
1432If 1428If
1433.Ar c 1429.Ar c
1434is omitted, no separator is used. 1430is omitted, no separator is used.
1435The common escapes (including octal numeric codes) work as expected. 1431The common escapes (including octal numeric codes) work as expected.
1436.It Cm \&:tu 1432.It Cm \&:tu
1437Converts the value to upper-case letters. 1433Converts the value to upper-case letters.
1438.It Cm \&:tW 1434.It Cm \&:tW
1439Causes subsequent modifiers to treat the value as a single word 1435Causes subsequent modifiers to treat the value as a single word
1440(possibly containing embedded whitespace). 1436(possibly containing embedded whitespace).
1441See also 1437See also
1442.Sq Cm \&:[*] . 1438.Sq Cm \&:[*] .
1443.It Cm \&:tw 1439.It Cm \&:tw
@@ -1620,28 +1616,28 @@ This is the loop expansion mechanism fro @@ -1620,28 +1616,28 @@ This is the loop expansion mechanism fro
1620Environment (ODE) make. 1616Environment (ODE) make.
1621Unlike 1617Unlike
1622.Cm \&.for 1618.Cm \&.for
1623loops, expansion occurs at the time of reference. 1619loops, expansion occurs at the time of reference.
1624For each word in the value, assign the word to the variable named 1620For each word in the value, assign the word to the variable named
1625.Ar varname 1621.Ar varname
1626and evaluate 1622and evaluate
1627.Ar string . 1623.Ar string .
1628The ODE convention is that 1624The ODE convention is that
1629.Ar varname 1625.Ar varname
1630should start and end with a period, for example: 1626should start and end with a period, for example:
1631.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} 1627.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@}
1632.Pp 1628.Pp
1633However, a single-character variable is often more readable: 1629However, a single-letter variable is often more readable:
1634.Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v:Q}'${.newline}@} 1630.Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}
1635.It Cm \&:_ Ns Oo Cm = Ns Ar var Oc 1631.It Cm \&:_ Ns Oo Cm = Ns Ar var Oc
1636Saves the current variable value in 1632Saves the current variable value in
1637.Ql $_ 1633.Ql $_
1638or the named 1634or the named
1639.Ar var 1635.Ar var
1640for later reference. 1636for later reference.
1641Example usage: 1637Example usage:
1642.Bd -literal -offset indent 1638.Bd -literal -offset indent
1643M_cmpv.units = 1 1000 1000000 1639M_cmpv.units = 1 1000 1000000
1644M_cmpv = S,., ,g:_:range:@i@+ $${_:[-$$i]} \&\\ 1640M_cmpv = S,., ,g:_:range:@i@+ $${_:[-$$i]} \&\\
1645\\* $${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh 1641\\* $${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh
1646 1642
1647.Dv .if ${VERSION:${M_cmpv}} < ${3.1.12:L:${M_cmpv}} 1643.Dv .if ${VERSION:${M_cmpv}} < ${3.1.12:L:${M_cmpv}}
@@ -1663,48 +1659,43 @@ It is handy for setting per-target CFLAG @@ -1663,48 +1659,43 @@ It is handy for setting per-target CFLAG
1663.Dl ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}} 1659.Dl ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}}
1664If a value is only required if the variable is undefined, use: 1660If a value is only required if the variable is undefined, use:
1665.Dl ${VAR:D:Unewval} 1661.Dl ${VAR:D:Unewval}
1666.It Cm \&:D\| Ns Ar newval 1662.It Cm \&:D\| Ns Ar newval
1667If the variable is defined, 1663If the variable is defined,
1668.Ar newval 1664.Ar newval
1669is the value. 1665is the value.
1670.It Cm \&:L 1666.It Cm \&:L
1671The name of the variable is the value. 1667The name of the variable is the value.
1672.It Cm \&:P 1668.It Cm \&:P
1673The path of the node which has the same name as the variable is the value. 1669The path of the node which has the same name as the variable is the value.
1674If no such node exists or its path is null, the name of the variable is used. 1670If no such node exists or its path is null, the name of the variable is used.
1675In order for this modifier to work, the name (node) must at least have 1671In order for this modifier to work, the name (node) must at least have
1676appeared on the rhs of a dependency. 1672appeared on the right-hand side of a dependency.
1677.Sm off 1673.Sm off
1678.It Cm \&:\&! Ar cmd\| Cm \&! 1674.It Cm \&:\&! Ar cmd\| Cm \&!
1679.Sm on 1675.Sm on
1680The output of running 1676The output of running
1681.Ar cmd 1677.Ar cmd
1682is the value. 1678is the value.
1683.It Cm \&:sh 1679.It Cm \&:sh
1684If the variable is non-empty, it is run as a command and the output 1680The value is run as a command, and the output becomes the new value.
1685becomes the new value. 
1686.It Cm \&::= Ns Ar str 1681.It Cm \&::= Ns Ar str
1687The variable is assigned the value 1682The variable is assigned the value
1688.Ar str 1683.Ar str
1689after substitution. 1684after substitution.
1690This modifier and its variations are useful in obscure situations 1685This modifier and its variations are useful in obscure situations
1691such as wanting to set a variable when shell commands are being parsed. 1686such as wanting to set a variable
1692These assignment modifiers always expand to nothing, 1687at a point where a target's shell commands are being parsed.
1693so if they appear in a rule line by themselves, 1688These assignment modifiers always expand to nothing.
1694they should be preceded with something, 
1695to keep 
1696.Nm 
1697happy. 
1698.Pp 1689.Pp
1699The 1690The
1700.Sq Cm \&:: 1691.Sq Cm \&::
1701helps avoid false matches with the 1692helps avoid false matches with the
1702.At V 1693.At V
1703style 1694style
1704.Cm \&:= 1695.Cm \&:=
1705modifier and since substitution always occurs, the 1696modifier and since substitution always occurs, the
1706.Cm \&::= 1697.Cm \&::=
1707form is vaguely appropriate. 1698form is vaguely appropriate.
1708.It Cm \&::?= Ns Ar str 1699.It Cm \&::?= Ns Ar str
1709As for 1700As for
1710.Cm \&::= 1701.Cm \&::=
@@ -1948,27 +1939,26 @@ End the body of the conditional. @@ -1948,27 +1939,26 @@ End the body of the conditional.
1948.El 1939.El
1949.Pp 1940.Pp
1950The 1941The
1951.Ar operator 1942.Ar operator
1952may be any one of the following: 1943may be any one of the following:
1953.Bl -tag -width "Cm XX" 1944.Bl -tag -width "Cm XX"
1954.It Cm \&|\&| 1945.It Cm \&|\&|
1955Logical OR. 1946Logical OR.
1956.It Cm \&&& 1947.It Cm \&&&
1957Logical AND; of higher precedence than 1948Logical AND; of higher precedence than
1958.Dq \&|\&| . 1949.Dq \&|\&| .
1959.El 1950.El
1960.Pp 1951.Pp
1961As in C, 
1962.Nm 1952.Nm
1963only evaluates a conditional as far as is necessary to determine its value. 1953only evaluates a conditional as far as is necessary to determine its value.
1964Parentheses can be used to override the operator precedence. 1954Parentheses can be used to override the operator precedence.
1965The boolean operator 1955The boolean operator
1966.Sq Ic \&! 1956.Sq Ic \&!
1967may be used to logically negate an entire 1957may be used to logically negate an entire
1968conditional. 1958conditional.
1969It is of higher precedence than 1959It is of higher precedence than
1970.Sq Ic \&&& . 1960.Sq Ic \&&& .
1971.Pp 1961.Pp
1972The value of 1962The value of
1973.Ar expression 1963.Ar expression
1974may be any of the following: 1964may be any of the following:
@@ -2017,51 +2007,51 @@ Numeric comparisons may also use the ope @@ -2017,51 +2007,51 @@ Numeric comparisons may also use the ope
2017.Sq Ic \&< , 2007.Sq Ic \&< ,
2018.Sq Ic \&<= , 2008.Sq Ic \&<= ,
2019.Sq Ic \&> 2009.Sq Ic \&>
2020and 2010and
2021.Sq Ic \&>= . 2011.Sq Ic \&>= .
2022.Pp 2012.Pp
2023If the comparison has neither a comparison operator nor a right side, 2013If the comparison has neither a comparison operator nor a right side,
2024the expression evaluates to true if it is nonempty 2014the expression evaluates to true if it is nonempty
2025and its numeric value (if any) is not zero. 2015and its numeric value (if any) is not zero.
2026.Pp 2016.Pp
2027When 2017When
2028.Nm 2018.Nm
2029is evaluating one of these conditional expressions, and it encounters 2019is evaluating one of these conditional expressions, and it encounters
2030a (white-space separated) word it doesn't recognize, either the 2020a (whitespace separated) word it doesn't recognize, either the
2031.Dq make 2021.Dq make
2032or 2022or
2033.Dq defined 2023.Dq defined
2034expression is applied to it, depending on the form of the conditional. 2024function is applied to it, depending on the form of the conditional.
2035If the form is 2025If the form is
2036.Sq Ic .ifdef , 2026.Sq Ic .ifdef ,
2037.Sq Ic .ifndef , 2027.Sq Ic .ifndef
2038or 2028or
2039.Sq Ic .if 2029.Sq Ic .if ,
2040the 2030the
2041.Dq defined 2031.Dq defined
2042expression is applied. 2032function is applied.
2043Similarly, if the form is 2033Similarly, if the form is
2044.Sq Ic .ifmake 2034.Sq Ic .ifmake
2045or 2035or
2046.Sq Ic .ifnmake , 2036.Sq Ic .ifnmake ,
2047the 2037the
2048.Dq make 2038.Dq make
2049expression is applied. 2039function is applied.
2050.Pp 2040.Pp
2051If the conditional evaluates to true the parsing of the makefile continues 2041If the conditional evaluates to true,
2052as before. 2042parsing of the makefile continues as before.
2053If it evaluates to false, the following lines are skipped. 2043If it evaluates to false, the following lines are skipped.
2054In both cases this continues until a 2044In both cases, this continues until the corresponding
2055.Sq Ic .else 2045.Sq Ic .else
2056or 2046or
2057.Sq Ic .endif 2047.Sq Ic .endif
2058is found. 2048is found.
2059.Pp 2049.Pp
2060For loops are typically used to apply a set of rules to a list of files. 2050For loops are typically used to apply a set of rules to a list of files.
2061The syntax of a for loop is: 2051The syntax of a for loop is:
2062.Pp 2052.Pp
2063.Bl -tag -compact -width Ds 2053.Bl -tag -compact -width Ds
2064.It Ic \&.for Ar variable Oo Ar variable ... Oc Ic in Ar expression 2054.It Ic \&.for Ar variable Oo Ar variable ... Oc Ic in Ar expression
2065.It Aq make-lines 2055.It Aq make-lines
2066.It Ic \&.endfor 2056.It Ic \&.endfor
2067.El 2057.El