1 .\" Copyright (c) 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
33 .\" $FreeBSD: src/usr.bin/make/make.1,v 1.29.2.15 2002/12/17 19:01:18 seanc Exp $
34 .\" $DragonFly: src/usr.bin/make/make.1,v 1.22 2005/02/14 11:12:03 okumoto Exp $
41 .Nd maintain program dependencies
56 .Op Ar variable Ns No = Ns Ar value
61 utility is a program designed to simplify the maintenance of other programs.
62 Its input is a list of specifications
63 describing dependency relationships between the generation of
70 that can be found in either the current directory or a special object directory
73 will be read for this list of specifications.
76 can be found, it is also read (see
79 This manual page is intended as a reference document only.
80 For a more thorough introduction to
82 and makefiles, please refer to
83 .%T "Make \- A Tutorial" .
85 The options are as follows:
88 Try to be backwards compatible by executing a single shell per command and
89 by executing the commands to make the sources of a dependency line in sequence.
90 This is turned on by default unless
96 before reading the makefiles or doing anything else.
99 options are specified, each is interpreted relative to the previous one:
100 .Fl C Pa / Fl C Pa etc
106 to be 1, in the global context.
108 Turn on debugging, and specify which portions of
110 are to print debugging information.
113 is one or more of the following:
116 Print all possible debugging information;
117 equivalent to specifying all of the debugging flags.
119 Print debugging information about archive searching and caching.
121 Print debugging information about conditional evaluation.
123 Print debugging information about directory searching and caching.
125 Print debugging information about the execution of for loops.
127 Print the input graph before making anything.
129 Print the input graph after making everything, or before exiting
132 Print debugging information about running multiple shells.
134 Print commands in Makefiles regardless of whether or not they are prefixed
135 by @ or other "quiet" flags.
136 Also known as "loud" behavior.
138 Print debugging information about making targets, including modification
141 Print debugging information about suffix-transformation rules.
143 Print debugging information about target list maintenance.
145 Print debugging information about variable assignment.
148 Specify a variable whose environment value (if any) will override
149 macro assignments within makefiles.
151 Specify that environment values override macro assignments within
152 makefiles for all variables.
154 Specify a makefile to read instead of the default
162 standard input is read.
163 Multiple makefiles may be specified, and are read in the order specified.
164 .It Fl I Ar directory
165 Specify a directory in which to search for makefiles and included makefiles.
166 The system makefile directory (or directories, see the
168 option) is automatically included as part of this list.
170 Ignore non-zero exit of shell commands in the makefile.
171 Equivalent to specifying
173 before each command line in the makefile.
175 Specify the maximum number of jobs that
177 may have running at any one time.
178 Turns compatibility mode off, unless the
180 flag is also specified.
182 Continue processing after errors are encountered, but only on those targets
183 that do not depend on the target whose creation caused the error.
184 .It Fl m Ar directory
185 Specify a directory in which to search for
187 and makefiles included via the <...> style.
188 Multiple directories can be added to form a search path.
189 This path will override the default system include path:
191 Furthermore, the system include path will be appended to the search path used
192 for "..."-style inclusions (see the
196 Display the commands that would have been executed, but do not actually
199 Collate the output of a given job and display it only when the job finishes,
200 instead of mixing the output of parallel jobs together.
201 This option has no effect unless
205 Do not execute any commands, but exit 0 if the specified targets are
206 up-to-date and 1, otherwise.
208 Do not use the built-in rules specified in the system makefile.
210 Stop processing when an error is encountered.
212 This is needed to negate the
214 option during recursive builds.
216 Do not echo any commands as they are executed.
217 Equivalent to specifying
219 before each command line in the makefile.
221 Rather than re-building a target as specified in the makefile, create it
222 or update its modification time to make it appear up-to-date.
228 in the global context.
229 Do not build any targets.
230 Multiple instances of this option may be specified;
231 the variables will be printed one per line,
232 with a blank line for each null or undefined variable.
235 For multi-job makes, this will cause file banners to be generated.
239 option to print the values of variables,
240 do not recursively expand the values.
241 .It Ar variable Ns No = Ns Ar value
242 Set the value of the variable
248 There are seven different types of lines in a makefile: file dependency
249 specifications, shell commands, variable assignments, include statements,
250 conditional directives, for loops, and comments.
252 In general, lines may be continued from one line to the next by ending
253 them with a backslash
255 The trailing newline character and initial whitespace on the following
256 line are compressed into a single space.
257 .Sh FILE DEPENDENCY SPECIFICATIONS
258 Dependency lines consist of one or more targets, an operator, and zero
260 This creates a relationship where the targets
263 and are usually created from them.
264 The exact relationship between the target and the source is determined
265 by the operator that separates them.
266 The three operators are as follows:
269 A target is considered out-of-date if its modification time is less than
270 those of any of its sources.
271 Sources for a target accumulate over dependency lines when this operator
273 The target is removed if
277 Targets are always re-created, but not until all sources have been
278 examined and re-created as necessary.
279 Sources for a target accumulate over dependency lines when this operator
281 The target is removed if
285 If no sources are specified, the target is always re-created.
286 Otherwise, a target is considered out-of-date if any of its sources has
287 been modified more recently than the target.
288 Sources for a target do not accumulate over dependency lines when this
290 The target will not be removed if
295 Targets and sources may contain the shell wildcard expressions
306 may only be used as part of the final
307 component of the target or source, and must be used to describe existing
311 need not necessarily be used to describe existing files.
312 Expansion is in directory order, not alphabetically as done in the shell.
314 Each target may have associated with it a series of shell commands, normally
315 used to create the target.
316 Each of the commands in this script
318 be preceded by a tab.
319 While any target may appear on a dependency line, only one of these
320 dependencies may be followed by a creation script, unless the
324 If the first characters of the command line are
329 the command is treated specially.
332 causes the command not to be echoed before it is executed.
335 causes any non-zero exit status of the command line to be ignored.
338 causes the command to be executed even if
340 is specified on the command line.
341 .Sh VARIABLE ASSIGNMENTS
344 are much like variables in the shell, and, by tradition,
345 consist of all upper-case letters.
346 The five operators that can be used to assign values to variables are as
350 Assign the value to the variable.
351 Any previous value is overridden.
353 Append the value to the current value of the variable.
355 Assign the value to the variable if it is not already defined.
357 Assign with expansion, i.e., expand the value before assigning it
359 Normally, expansion is not done until the variable is referenced.
361 Expand the value and pass it to the shell for execution and assign
362 the result to the variable.
363 Any newlines in the result are replaced with spaces.
366 Any whitespace before the assigned
368 is removed; if the value is being appended, a single space is inserted
369 between the previous contents of the variable and the appended value.
371 Variables are expanded by surrounding the variable name with either
376 and preceding it with
379 If the variable name contains only a single letter, the surrounding
380 braces or parentheses are not required.
381 This shorter form is not recommended.
383 Variable substitution occurs at two distinct times, depending on where
384 the variable is being used.
385 Variables in dependency lines are expanded as the line is read.
386 Variables in shell commands are expanded when the shell command is
389 The four different classes of variables (in order of increasing precedence)
392 .It Environment variables
393 Variables defined as part of
397 Variables defined in the makefile or in included makefiles.
398 .It Command line variables
399 Variables defined as part of the command line and variables
402 environment variable or the
406 Variables that are defined specific to a certain target.
407 The seven local variables are as follows:
408 .Bl -tag -width ".ARCHIVE"
410 The list of all sources for this target; also known as
413 The name of the archive file; also known as
416 The name/path of the source from which the target is to be transformed
419 source); also known as
422 The name of the archive member; also known as
425 The list of sources for this target that were deemed out-of-date; also
429 The file prefix of the file, containing only the file portion, no suffix
430 or preceding directory components; also known as
433 The name of the target; also known as
446 are permitted for backward
447 compatibility and are not recommended.
457 permitted for compatibility with
459 makefiles and are not recommended.
461 Four of the local variables may be used in sources on dependency lines
462 because they expand to the proper value for each target on the line.
473 sets or knows about the following internal variables or environment
475 .Bl -tag -width ".Va .MAKEFILE_LIST"
481 expands to a single dollar
487 .Pq Va argv Ns Op 0 .
489 A path to the directory where
496 to the canonical path given by
499 A path to the directory where the targets are built.
502 searches for an alternate directory to place target files.
503 It will attempt to change into this special directory
504 and will search this directory for makefiles
505 not found in the current directory.
506 The following directories are tried in order:
510 ${MAKEOBJDIRPREFIX}/`pwd`
521 The first directory that
523 successfully changes into is used.
528 is set in the environment but
530 is unable to change into the corresponding directory,
531 then the current directory is used
532 without checking the remainder of the list.
533 If they are undefined and
535 is unable to change into any of the remaining three directories,
536 then the current directory is used.
541 must be environment variables and should not be set on
549 to the canonical path given by
551 .It Va .MAKEFILE_LIST
554 reads various makefiles, including the default files and any
555 obtained from the command line and
557 directives, their names will be automatically appended to the
560 They are added right before
562 begins to parse them, so that the name of the current makefile is the
563 last word in this variable.
565 The environment variable
567 may contain anything that
571 Its contents are stored in
575 All options and variable assignments specified on
577 command line are appended to the
579 variable which is then
580 entered into the environment as
582 for all programs which
585 By modifying the contents of the
587 variable, makefile can alter the contents of the
589 environment variable made available for all programs which
591 executes; compare with the
593 special target below.
595 When passing macro definitions and flag arguments in the
597 environment variable,
598 space and tab characters are quoted by preceding them with a backslash.
601 variable from the environment,
602 all sequences of a backslash and one of space or tab
603 are replaced just with their second character
604 without causing a word break.
605 Any other occurences of a backslash are retained.
606 Groups of unquoted space, tab and newline characters cause word
609 This variable is provided for backward compatibility and
610 contains all the options from the
612 environment variable plus any options specified on
618 is currently building.
628 Name of the machine architecture
630 is running on, obtained from the
632 environment variable, or through
636 Name of the machine architecture
638 was compiled for, defined at compilation time.
640 Makefiles may assign a colon-delimited list of directories to
642 These directories will be searched for source files by
644 after it has finished parsing all input makefiles.
647 Variable expansion may be modified to select or modify each word of the
650 is whitespace-delimited sequence of characters).
651 The general format of a variable expansion is as follows:
653 .Dl {variable[:modifier[:...]]}
655 Each modifier begins with a colon and one of the following
657 The colon may be escaped with a backslash
661 .It Cm C No \&/ Ar pattern Xo
662 .No \&/ Ar replacement
666 Modify each word of the value,
667 substituting every match of the extended regular expression
675 Normally, the first occurrence of the pattern in
676 each word of the value is changed.
679 modifier causes the substitution to apply to at most one word; the
681 modifier causes the substitution to apply to as many instances of the
682 search pattern as occur in the word or words it is found in.
687 are orthogonal; the former specifies whether multiple words are
688 potentially affected, the latter whether multiple substitutions can
689 potentially occur within each affected word.
691 Replaces each word in the variable with its suffix.
693 Replaces each word in the variable with everything but the last component.
695 Converts variable to lower-case letters.
696 .It Cm M Ns Ar pattern
697 Select only those words that match the rest of the modifier.
698 The standard shell wildcard characters
705 The wildcard characters may be escaped with a backslash
707 .It Cm N Ns Ar pattern
710 but selects all words which do not match
711 the rest of the modifier.
713 Order every word in the variable alphabetically.
715 Quotes every shell meta-character in the variable, so that it can be passed
716 safely through recursive invocations of
719 Replaces each word in the variable with everything but its suffix.
721 .It Cm S No \&/ Ar old_string Xo
722 .No \&/ Ar new_string
726 Modify the first occurrence of
728 in each word of the variable's value, replacing it with
732 is appended to the last slash of the pattern, all occurrences
733 in each word are replaced.
739 is anchored at the beginning of each word.
742 ends with a dollar sign
744 it is anchored at the end of each word.
751 Any character may be used as a delimiter for the parts of the modifier
753 The anchoring, ampersand, and delimiter characters may be escaped with a
757 Variable expansion occurs in the normal fashion inside both
761 with the single exception that a backslash is used to prevent the expansion
764 not a preceding dollar sign as is usual.
765 .It Ar old_string=new_string
768 style variable substitution.
769 It must be the last modifier specified.
774 do not contain the pattern matching character
776 then it is assumed that they are
777 anchored at the end of each word, so only suffixes or entire
778 words may be replaced.
786 Replaces each word in the variable with its last component.
788 Converts variable to upper-case letters.
790 .Sh DIRECTIVES, CONDITIONALS, AND FOR LOOPS
791 Directives, conditionals, and for loops reminiscent
792 of the C programming language are provided in
794 All such structures are identified by a line beginning with a single
798 The following directives are supported:
800 .It Ic \&.include Ar <file>
801 .It Ic \&.include Ar \*qfile\*q
802 Include the specified makefile.
803 Variables between the angle brackets
804 or double quotes are expanded to form the file name.
806 are used, the included makefile is expected to be in the system
808 If double quotes are used, the including
809 makefile's directory and any directories specified using the
811 option are searched before the system
813 .It Ic .undef Ar variable
814 Un-define the specified global variable.
815 Only global variables may be un-defined.
816 .It Ic \&.makeenv Ar variable
817 Set the environment flag for a preexisting global variable. The current
818 and future contents of the variable will be exported to the environment.
819 .It Ic .error Ar message
820 Terminate processing of the makefile immediately.
822 makefile, the line on which the error was encountered and the specified
823 message are printed to the standard error output and
825 terminates with exit code 1.
826 Variables in the message are expanded.
827 .It Ic .warning Ar message
828 Emit a warning message.
829 The filename of the makefile,
830 the line on which the warning was encountered,
831 and the specified message are printed to the standard error output.
832 Variables in the message are expanded.
835 Conditionals are used to determine which parts of the Makefile
837 They are used similarly to the conditionals supported
838 by the C pre-processor.
839 The following conditionals are supported:
843 .Oo \&! Oc Ns Ar expression
844 .Op Ar operator expression ...
846 Test the value of an expression.
849 .Oo \&! Oc Ns Ar variable
850 .Op Ar operator variable ...
852 Test the value of a variable.
855 .Oo \&! Oc Ns Ar variable
856 .Op Ar operator variable ...
858 Test the value of a variable.
861 .Oo \&! Oc Ns Ar target
862 .Op Ar operator target ...
864 Test the target being built.
867 .Oo \&! Oc Ns Ar target
868 .Op Ar operator target ...
870 Test the target being built.
872 Reverse the sense of the last conditional.
875 .Oo \&! Oc Ns Ar expression
876 .Op Ar operator expression ...
884 .Oo \&! Oc Ns Ar variable
885 .Op Ar operator variable ...
893 .Oo \&! Oc Ns Ar variable
894 .Op Ar operator variable ...
902 .Oo \&! Oc Ns Ar target
903 .Op Ar operator target ...
911 .Oo \&! Oc Ns Ar target
912 .Op Ar operator target ...
919 End the body of the conditional.
924 may be any one of the following:
925 .Bl -tag -width "Cm XX"
932 of higher precedence than
938 will only evaluate a conditional as far as is necessary to determine
940 Parentheses may be used to change the order of evaluation.
943 may be used to logically negate an entire
945 It is of higher precedence than
950 may be any of the following:
953 Takes a variable name as an argument and evaluates to true if the variable
956 Takes a target name as an argument and evaluates to true if the target
957 was specified as part of
959 command line or was declared the default target (either implicitly or
962 before the line containing the conditional.
964 Takes a variable, with possible modifiers, and evaluates to true if
965 the expansion of the variable would result in an empty string.
967 Takes a file name as an argument and evaluates to true if the file exists.
968 The file is searched for on the system search path (see
971 Takes a target name as an argument and evaluates to true if the target
977 may also be an arithmetic or string comparison, with the left-hand side
978 being a variable expansion.
979 Variable expansion is
980 performed on both sides of the comparison, after which the integral
982 A value is interpreted as hexadecimal if it is
983 preceded by 0x, otherwise it is decimal; octal numbers are not supported.
984 The standard C relational operators are all supported.
986 variable expansion, either the left or right hand side of a
990 operator is not an integral value, then
991 string comparison is performed between the expanded
993 If no relational operator is given, it is assumed that the expanded
994 variable is being compared against 0.
998 is evaluating one of these conditional expressions, and it encounters
999 a word it does not recognize, either the
1003 expression is applied to it, depending on the form of the conditional.
1011 expression is applied.
1012 Similarly, if the form is
1018 expression is applied.
1020 If the conditional evaluates to true the parsing of the makefile continues
1022 If it evaluates to false, the following lines are skipped.
1023 In both cases this continues until a
1029 For loops are typically used to apply a set of rules to a list of files.
1030 The syntax of a for loop is:
1032 .Bl -tag -width indent -compact
1033 .It Ic .for Ar variable Ic in Ar expression
1040 is evaluated, it is split into words.
1044 is successively set to each word, and substituted in the
1046 inside the body of the for loop.
1048 Comments begin with a hash
1050 character, anywhere but in a shell
1051 command line, and continue to the end of the line.
1055 Ignore any errors from the commands associated with this target, exactly
1056 as if they all were preceded by a dash
1059 Execute the commands associated with this target even if the
1063 options were specified.
1064 Normally used to mark recursive
1069 selects the first target it encounters as the default target to be built
1070 if no target was specified.
1071 This source prevents this target from being selected.
1073 If a target is marked with this attribute and
1075 cannot figure out how to create it, it will ignore this fact and assume
1076 the file is not needed or already exists.
1080 is interrupted, it removes any partially made targets.
1081 This source prevents the target from being removed.
1083 Do not echo any of the commands associated with this target, exactly
1084 as if they all were preceded by an at sign
1087 Turn the target into
1090 When the target is used as a source for another target, the other target
1091 acquires the commands, sources, and attributes (except for
1095 If the target already has commands, the
1097 target's commands are appended
1102 source is appears in a dependency line, the sources that precede it are
1103 made before the sources that succeed it in the line.
1105 detected and targets that form loops will be silently ignored.
1107 .Sh "SPECIAL TARGETS"
1108 Special targets may not be included with other targets, i.e., they must be
1109 the only target specified.
1112 Any command lines attached to this target are executed before anything
1117 rule for any target (that was used only as a
1120 cannot figure out any other way to create.
1121 Only the shell script is used.
1124 variable of a target that inherits
1127 to the target's own name.
1129 Any command lines attached to this target are executed after everything
1132 Mark each of the sources with the
1135 If no sources are specified, this is the equivalent of specifying the
1139 A list of suffixes that indicate files that can be included in a source
1141 The suffix must have already been declared with
1143 any suffix so declared will have the directories on its search path (see
1147 special variable, each preceded by a
1153 is interrupted, the commands for this target will be executed.
1155 This does for libraries what
1157 does for include files, except that the flag used is
1160 If no target is specified when
1162 is invoked, this target will be built.
1163 This is always set, either
1164 explicitly, or implicitly when
1166 selects the default target, to give the user a way to refer to the default
1167 target on the command line.
1169 This target provides a way to specify flags for
1171 when the makefile is used.
1172 The flags are as if typed to the shell, though the
1178 and variable assignments specified as the source
1179 for this target are also appended to the
1182 Please note the difference between this target and the
1184 internal variable: specifying an option or variable
1185 assignment as the source for this target will affect
1187 the current makefile and all processes that
1191 Same as above, for backward compatibility.
1192 .\" XXX: NOT YET!!!!
1193 .\" .It Ic .NOTPARALLEL
1194 .\" The named targets are executed in non parallel mode. If no targets are
1195 .\" specified, then all targets are executed in non parallel mode.
1197 Disable parallel mode.
1199 Same as above, for compatibility with other
1203 The named targets are made in sequence.
1204 .\" XXX: NOT YET!!!!
1205 .\" .It Ic .PARALLEL
1206 .\" The named targets are executed in parallel mode. If no targets are
1207 .\" specified, then all targets are executed in parallel mode.
1209 The sources are directories which are to be searched for files not
1210 found in the current directory.
1211 If no sources are specified, any previously specified directories are
1213 Where possible, use of
1215 is preferred over use of the
1218 .It Ic .PATH\fIsuffix\fR
1219 The sources are directories which are to be searched for suffixed files
1220 not found in the current directory.
1224 first searches the suffixed search path, before reverting to the default
1225 path if the file is not found there.
1226 This form is required for
1234 attribute to any specified sources.
1235 Targets with this attribute are always
1236 considered to be out of date.
1240 attribute to any specified sources.
1241 If no sources are specified, the
1243 attribute is applied to every
1246 Select another shell.
1247 The sources of this target have the format
1248 .Ar key Ns = Ns Ar value .
1252 .Bl -tag -width ".Va hasErrCtl"
1254 Specify the path to the new shell.
1256 Specify the name of the new shell.
1257 This may be either one of the three builtin shells (see below) or any
1260 Specify the shell command to turn echoing off.
1262 Specify the shell command to turn echoing on.
1264 Usually shells print the echo off command before turning echoing off.
1265 This is the exact string that will be printed by the shell and is used
1266 to filter the shell output to remove the echo off command.
1268 The shell option that turns echoing on.
1270 The shell option to turn on error checking.
1271 If error checking is on, the shell should exit if a command returns
1274 True if the shell has error control.
1278 is true then this is the shell command to turn error checking on.
1281 is false then this is a command template to echo commands for which error
1282 checking is disabled.
1283 The template must contain a
1288 is true, this is the shell command to turn error checking off.
1291 is false, this is a command template to execute a command so that errors
1293 The template must contain a
1297 Values that are strings must be surrounded by double quotes.
1298 Boolean values are specified as
1302 (in either case) to mean true.
1303 Any other value is taken to mean false.
1305 There are several uses of the
1310 Selecting one of the builtin shells.
1311 This is done by just specifying the name of the shell with the
1314 It is also possible to modify the parameters of the builtin shell by just
1315 specifying other keywords (except for
1318 Using another executable for one of the builtin shells.
1319 This is done by specifying the path to the executable with the
1322 If the last component is the same as the name of the builtin shell, no
1323 name needs to be specified; if it is different, the name must be given:
1324 .Bd -literal -offset indent
1325 \&.SHELL: path="/usr/local/bin/sh"
1328 selects the builtin shell
1330 but will execute it from
1331 .Pa /usr/local/bin/sh .
1332 Like in the previous case, it is possible to modify parameters of the builtin
1333 shell by just specifying them.
1335 Using an entirely different shell.
1336 This is done by specifying all keywords.
1339 The builtin shells are
1350 it is unwise to specify
1351 .Va name Ns = Ns Qq Li ksh
1352 without also specifying a path.
1356 attribute to any specified sources.
1357 If no sources are specified, the
1359 attribute is applied to every
1360 command in the file.
1362 Each source specifies a suffix to
1364 If no sources are specified, any previous specified suffices are deleted.
1369 utility uses the following environment variables, if they exist:
1375 .Ev MAKEOBJDIRPREFIX .
1377 .Bl -tag -width /usr/share/doc/psd/12.make -compact
1379 list of dependencies
1381 list of dependencies
1383 list of dependencies
1387 system makefile (processed before any other file, including
1391 .It Pa /usr/share/mk
1392 system makefile directory
1393 .It /usr/share/doc/psd/12.make
1397 .Ev MAKEOBJDIRPREFIX
1401 List all included makefiles in order visited:
1403 .Dl "make -V .MAKEFILE_LIST | tr \e\ \e\en"
1411 This was removed for POSIX compatibility.
1412 The internal variable
1414 is set to the same value as
1416 support for this may be removed in the future.
1418 Most of the more esoteric features of
1420 should probably be avoided for greater compatibility.
1425 .%T "PMake - A Tutorial"
1428 .Pa /usr/share/doc/psd/12.make
1432 command appeared in PWB UNIX.
1434 The determination of
1436 is contorted to the point of absurdity.
1438 In the presence of several
1442 silently ignores all but the first.
1445 is not set to the default target when
1447 is invoked without a target name and no
1449 special target exists.
1453 in a test is very simple-minded.
1454 Currently, the only form that works is
1455 .Ql .if ${VAR} op something
1456 For instance, you should write tests as
1457 .Ql .if ${VAR} == "string"
1458 not the other way around, which would give you an error.
1460 For loops are expanded before tests, so a fragment such as:
1461 .Bd -literal -offset indent
1462 \&.for ARCH in ${SHARED_ARCHS}
1463 \&.if ${ARCH} == ${MACHINE}
1469 will not work, and should be rewritten as:
1470 .Bd -literal -offset indent
1471 \&.for ARCH in ${SHARED_ARCHS}
1472 \&.if ${MACHINE} == ${ARCH}
1478 The parsing code is broken with respect to handling a semicolon
1479 after a colon, so a fragment like this will fail:
1480 .Bd -literal -offset indent
1484 \&.for h in ${HDRS:S;^;${.CURDIR}/;}
1489 A trailing backslash in a variable value defined on the command line causes
1490 the delimiting space in the
1492 environment variable to be preceeded by that backslash.
1493 That causes a submake to not treat that space as a word delimiter.
1494 Fixing this requires a larger rewrite of the code handling command line
1495 macros and assignments to