Annotation of 43BSDReno/usr.bin/make/make.1, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1990 The Regents of the University of California.
        !             2: .\" All rights reserved.
        !             3: .\"
        !             4: .\" Redistribution and use in source and binary forms are permitted provided
        !             5: .\" that: (1) source distributions retain this entire copyright notice and
        !             6: .\" comment, and (2) distributions including binaries display the following
        !             7: .\" acknowledgement:  ``This product includes software developed by the
        !             8: .\" University of California, Berkeley and its contributors'' in the
        !             9: .\" documentation or other materials provided with the distribution and in
        !            10: .\" all advertising materials mentioning features or use of this software.
        !            11: .\" Neither the name of the University nor the names of its contributors may
        !            12: .\" be used to endorse or promote products derived from this software without
        !            13: .\" specific prior written permission.
        !            14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            17: .\"
        !            18: .\"     @(#)make.1     5.3 (Berkeley) 7/24/90
        !            19: .\"
        !            20: .Dd July 24, 1990
        !            21: .Dt MAKE 1
        !            22: .Os BSD 4.4
        !            23: .Sh NAME
        !            24: .Nm make
        !            25: .Nd maintain program dependencies
        !            26: .Sh SYNOPSIS
        !            27: .Nm make
        !            28: .Op Fl eiknqrstv
        !            29: .Op Fl D Ar variable
        !            30: .Op Fl d Ar flags
        !            31: .Op Fl f Ar makefile
        !            32: .Op Fl I Ar directory
        !            33: .Op Fl j Ar max_jobs
        !            34: .Op Ar variable=value
        !            35: .Op Ar target ...
        !            36: .Sh DESCRIPTION
        !            37: .Nm Make
        !            38: is a program designed to simplify the maintenance of other programs.
        !            39: Its input is a ``makefile'' which specifies files that programs and
        !            40: other files are dependent upon.
        !            41: .Pp
        !            42: This manual page is intended as a reference document only.
        !            43: For a more thorough description of
        !            44: .Nm make
        !            45: and makefiles, please refer to
        !            46: .Em Make \-\- A Tutorial .
        !            47: .Pp
        !            48: The options are as follows:
        !            49: .Tw Ds
        !            50: .Tp Cx Fl
        !            51: .Ar variable
        !            52: .Cx
        !            53: Define
        !            54: .Ar variable
        !            55: to be 1, in the global context.
        !            56: .Tp Cx Fl d
        !            57: .Ar flags
        !            58: .Cx
        !            59: Turn on debugging, and specify which portions of
        !            60: .Nm make
        !            61: are to print debugging information.
        !            62: .Ar Flags
        !            63: is one or more of the following:
        !            64: .Tw Ds
        !            65: .Tp Ic A
        !            66: Print all possible debugging information; equivalent to specifying
        !            67: all of the debugging flags.
        !            68: .Tp Ic a
        !            69: Print debugging information about archive searching and caching.
        !            70: .Tp Ic c
        !            71: Print debugging information about conditional evaluation.
        !            72: .Tp Ic d
        !            73: Print debugging information about directory searching and caching.
        !            74: .Tp Ic g1
        !            75: Print the input graph before making anything.
        !            76: .Tp Ic g2
        !            77: Print the input graph after making everything, or before exiting
        !            78: on error.
        !            79: .Tp Ic j
        !            80: Print debugging information about running multiple shells.
        !            81: .Tp Ic m
        !            82: Print debugging information about making targets, including modification
        !            83: dates.
        !            84: .Tp Ic s
        !            85: Print debugging information about suffix-transformation rules.
        !            86: .Tp Ic t
        !            87: Print debugging information about target list maintenance.
        !            88: .Tp Ic v
        !            89: Print debugging information about variable assignment.
        !            90: .Tp
        !            91: .Tp Cx Fl f
        !            92: .Ar makefile
        !            93: .Cx
        !            94: Specify a makefile to read.
        !            95: If no makefile is specified, the files ``makefile'' and ``Makefile''
        !            96: are searched for, in that order.
        !            97: If
        !            98: .Ar makefile
        !            99: is ``\-'', standard input is read.
        !           100: Multiple makefile's may be specified, and are read in the order specified.
        !           101: .Tp Cx Fl I
        !           102: .Ar directory
        !           103: .Cx
        !           104: Specify a directory in which to search for makefiles and included makefiles.
        !           105: The system makefile directory is automatically included as part of this
        !           106: list.
        !           107: .Tp Fl i
        !           108: Ignore non-zero exit of shell commands in the makefile.
        !           109: Equivalent to specifying ``\-'' before each command line in the makefile.
        !           110: .Tp Cx Fl j 
        !           111: .Ar max_jobs
        !           112: .Cx
        !           113: Specify the maximum number of jobs that
        !           114: .Nm make
        !           115: may have running at any one time.
        !           116: .Tp Fl k
        !           117: Continue processing after errors are encountered, but only on those targets
        !           118: that do not depend on the target whose creation caused the error.
        !           119: .Tp Fl n
        !           120: Display the commands that would have been executed, but do not actually
        !           121: execute them.
        !           122: .Tp Fl q
        !           123: Do not execute any commands, but exit 0 if the specified targets are
        !           124: up-to-date and 1, otherwise.
        !           125: .Tp Fl r
        !           126: Do not use the built-in rules specified in the system makefile.
        !           127: .Tp Fl s
        !           128: Do not echo any commands as they are executed.
        !           129: Equivalent to specifying ``@'' before each command line in the makefile.
        !           130: .Tp Fl t
        !           131: Rather than re-building a target as specified in the makefile, create it
        !           132: or update its modification time to make it appear up-to-date.
        !           133: .Tp Ar variable=value
        !           134: Set the value of the variable
        !           135: .Ar variable
        !           136: to
        !           137: .Ar value  .
        !           138: .Tp
        !           139: .Pp
        !           140: There are six different types of lines in a makefile: file dependency
        !           141: specifications, shell commands, variable assignments, include statements,
        !           142: conditional directives, and comments.
        !           143: .Pp
        !           144: In general, lines may be continued from one line to the next by ending
        !           145: them with a backslash (``\e'').
        !           146: The trailing newline character and initial whitespace on the following
        !           147: line are compressed into a single space.
        !           148: .Sh FILE DEPENDENCY SPECIFICATIONS
        !           149: Dependency lines consist of one or more targets, an operator, and zero
        !           150: or more sources.
        !           151: This creates a relationship where the targets ``depend'' on the sources
        !           152: and are usually created from them.
        !           153: The exact relationship between the target and the source is determined
        !           154: by the operator that separates them.
        !           155: The three operators are as follows:
        !           156: .Tw Ds
        !           157: .Tp Ic \&:
        !           158: A target is considered out-of-date if its modification time is less than
        !           159: those of any of its sources.
        !           160: Sources for a target accumulate over dependency lines when this operator
        !           161: is used.
        !           162: The target is removed if
        !           163: .Nm make
        !           164: is interrupted.
        !           165: .Tp Ic \&!
        !           166: Targets are always re-created, but not until all sources have been
        !           167: examined and re-created as necessary.
        !           168: Sources for a target accumulate over dependency lines when this operator
        !           169: is used.
        !           170: The target is removed if
        !           171: .Nm make
        !           172: is interrupted.
        !           173: .Tp Ic \&::
        !           174: If no sources are specified, the target is always re-created.
        !           175: Otherwise, a target is considered out-of-date if any of its sources has
        !           176: been modified more recently than the target.
        !           177: Sources for a target do not accumulate over dependency lines when this
        !           178: operator is used.
        !           179: The target will not be removed if
        !           180: .Nm make
        !           181: is interrupted.
        !           182: .Tp
        !           183: .Pp
        !           184: Targets and sources may contain the shell wildcard values ``?'', ``*'',
        !           185: .Dq Op
        !           186: and ``{}''.
        !           187: The values ``?'', ``*'' and
        !           188: .Dq Op
        !           189: may only be used as part of the final
        !           190: component of the target or source, and must be used to describe existing
        !           191: files.
        !           192: The value ``{}'' need not necessarily be used to describe existing files.
        !           193: Expansion is in directory order, not alphabetically as done in the shell.
        !           194: .Sh SHELL COMMANDS
        !           195: Each target may have associated with it a series of shell commands, normally
        !           196: used to create the target.
        !           197: Each of the commands in this script
        !           198: .Em must
        !           199: be preceded by a tab.
        !           200: While any target may appear on a dependency line, only one of these
        !           201: dependencies may be followed by a creation script, unless the ``::''
        !           202: operator is used.
        !           203: .Pp
        !           204: If the first or first two characters of the command line are ``@'' and/or
        !           205: ``\-'', the command is treated specially.
        !           206: A ``@'' causes the command not to be echoed before it is executed.
        !           207: A ``\-'' causes any non-zero exit status of the command line to be ignored.
        !           208: .Sh VARIABLE ASSIGNMENTS
        !           209: Variables in make are much like variables in the shell, and, by tradition,
        !           210: consist of all upper-case letters.
        !           211: The five operators that can be used to assign values to variables are as
        !           212: follows:
        !           213: .Tw Ds
        !           214: .Tp Ic \&=
        !           215: Assign the value to the variable.
        !           216: Any previous value is overridden.
        !           217: .Tp Ic \&+=
        !           218: Append the value to the current value of the variable.
        !           219: .Tp Ic \&?=
        !           220: Assign the value to the variable if it is not already defined.
        !           221: .Tp Ic \&:=
        !           222: Assign with expansion, i.e. expand the value before assigning it
        !           223: to the variable.
        !           224: Normally, expansion is not done until the variable is referenced.
        !           225: .Tp Ic \&!=
        !           226: Expand the value and pass it to the shell for execution and assign
        !           227: the result to the variable.
        !           228: Any newlines in the result are replaced with spaces.
        !           229: .Tp
        !           230: .Pp
        !           231: Any white-space before the assigned
        !           232: .Ar value
        !           233: is removed; if the value is being appended, a single space is inserted
        !           234: between the previous contents of the variable and the appended value.
        !           235: .Pp
        !           236: Variables are expanded by surrounding the variable name with either
        !           237: curly braces (``{}'') or parenthesis (``()'') and preceding it with
        !           238: a dollar sign (``$'').
        !           239: If the variable name contains only a single letter, the surrounding
        !           240: braces or parenthesis are not required.
        !           241: This shorter form is not recommended.
        !           242: .Pp
        !           243: Variable substitution occurs at two distinct times, depending on where
        !           244: the variable is being used.
        !           245: Variables in dependency lines are expanded as the line is read.
        !           246: Variables in shell commands are expanded when the shell command is
        !           247: executed.
        !           248: .Pp
        !           249: The four different classes of variables (in order of increasing precedence)
        !           250: are:
        !           251: .Tw Ds
        !           252: .Tp environment variables
        !           253: Variables defined as part of
        !           254: .Cx Nm make
        !           255: .Cx \'s
        !           256: .Cx
        !           257: environment.
        !           258: .Tp global variables
        !           259: Variables defined in the makefile or in included makefiles.
        !           260: .Tp command line variables
        !           261: Variables defined as part of the command line.
        !           262: .Tp local variables
        !           263: Variables that are defined specific to a certain target.
        !           264: The seven local variables are as follows:
        !           265: .Tw Ds
        !           266: .Tp Va \&.ALLSRC
        !           267: The list of all sources for this target; also known as ``>''.
        !           268: .Tp Va \&.ARCHIVE
        !           269: The name of the archive file.
        !           270: .Tp Va \&.IMPSRC
        !           271: The name/path of the source from which the target is to be transformed
        !           272: (the ``implied'' source); also known as ``<''.
        !           273: .Tp Va \&.MEMBER
        !           274: The name of the archive member.
        !           275: .Tp Va \&.OODATE
        !           276: The list of sources for this target that were deemed out-of-date; also
        !           277: known as ``?''.
        !           278: .Tp Va \&.PREFIX
        !           279: The file prefix of the file, containing only the file portion, no suffix
        !           280: or preceding directory components; also known as ``*'.
        !           281: .Tp Va \&.TARGET
        !           282: The name of the target; also known as ``@''.
        !           283: .Tp
        !           284: .Pp
        !           285: The shorter forms ``@'', ``?'', ``>'' and ``*'' are permitted for backward
        !           286: compatibility with historical makefiles and are not recommended.
        !           287: The six variables ``@F'', ``@D'', ``<F'', ``<D'', ``*F'' and ``*D'' are
        !           288: permitted for compatibility with System V makefiles and are not recommended.
        !           289: .Pp
        !           290: Four of the local variables may be used in sources on dependency lines
        !           291: because they expand to the proper value for each target on the line.
        !           292: These variables are ``.TARGET'', ``.PREFIX'', ``.ARCHIVE'', and ``.MEMBER''.
        !           293: .Pp
        !           294: In addition,
        !           295: .Nm make
        !           296: sets or knows about the following variables:
        !           297: .Tw MAKEFLAGS
        !           298: .Tp Va \&$
        !           299: A single dollar sign (``$''), i.e. ``$$'' expands to a single dollar
        !           300: sign.
        !           301: .Tp Va \&.MAKE
        !           302: The name that
        !           303: .Nm make
        !           304: was executed with
        !           305: .Pq Cx Va argv
        !           306: .Op 0
        !           307: .Cx
        !           308: .Tp Va \&.CURDIR
        !           309: A path to the directory where
        !           310: .Nm make
        !           311: was executed.
        !           312: .Tp Va MAKEFLAGS
        !           313: The environment variable ``MAKEFLAGS'' may contain anything that
        !           314: may be specified on
        !           315: .Cx Nm make
        !           316: .Cx \'s
        !           317: .Cx
        !           318: command line.
        !           319: Anything specified on
        !           320: .Cx Nm make
        !           321: .Cx \'s
        !           322: .Cx
        !           323: command line is appended to the ``MAKEFLAGS'' variable which is then
        !           324: entered into the environment for all programs which
        !           325: .Nm make
        !           326: executes.
        !           327: .Tp
        !           328: .Pp
        !           329: Variable expansion may be modified to select or modify each word of the
        !           330: variable (where a ``word'' is white-space delimited sequence of characters).
        !           331: The general format of a variable expansion is as follows:
        !           332: .Pp
        !           333: .Dl {variable[:modifier[:...]]}
        !           334: .Pp
        !           335: Each modifier begins with a colon and one of the following
        !           336: special characters.
        !           337: The colon may be escaped with a backslash (``\e'').
        !           338: .Tp Cm E\&
        !           339: Replaces each word in the variable with its suffix.
        !           340: .Tp Cm \&H
        !           341: Replaces each word in the variable with everything but the last component.
        !           342: .Tp Cx Ic M
        !           343: .Ar pattern
        !           344: .Cx
        !           345: Select only those words that match the rest of the modifier.
        !           346: The standard shell wildcard characters (``*'', ``?'', and
        !           347: .Dq Op )
        !           348: may
        !           349: be used.
        !           350: The wildcard characters may be escaped with a backslash (``\e'').
        !           351: .Tp Cx Ic N
        !           352: .Ar pattern
        !           353: .Cx
        !           354: This is identical to ``M'', but selects all words which do not match
        !           355: the rest of the modifier.
        !           356: .Tp Cm R
        !           357: Replaces each word in the variable with everything but its suffix.
        !           358: .Tp Cx Cm S
        !           359: .Cx \&/
        !           360: .Ar old_pattern
        !           361: .Cx \&/
        !           362: .Ar new_pattern
        !           363: .Cx \&/
        !           364: .Op Cm g
        !           365: .Cx
        !           366: Modify the first occurrence of
        !           367: .Ar old_pattern
        !           368: in each word to be replaced with
        !           369: .Ar new_pattern  .
        !           370: If a ``g'' is appended to the last slash of the pattern, all occurrences
        !           371: in each word are replaced.
        !           372: If
        !           373: .Ar old_pattern
        !           374: begins with a carat (``^''),
        !           375: .Ar old_pattern
        !           376: is anchored at the beginning of each word.
        !           377: If
        !           378: .Ar old_pattern
        !           379: ends with a dollar sign (``$''), it is anchored at the end of each word.
        !           380: Inside
        !           381: .Ar new_string  ,
        !           382: an ampersand (``&'') is replaced by
        !           383: .Ar old_pattern .
        !           384: Any character may be used as a delimiter for the parts of the modifier
        !           385: string.
        !           386: The anchoring, ampersand and delimiter characters may be escaped with a
        !           387: backslash (``\e'').
        !           388: .Pp
        !           389: Variable expansion occurs in the normal fashion inside both
        !           390: .Ar old_string
        !           391: and
        !           392: .Ar new_string
        !           393: with the single exception that a backslash is used to prevent the expansion
        !           394: of a dollar sign (``$''), not a preceding dollar sign as is usual.
        !           395: .Tp Cm T
        !           396: Replaces each word in the variable with its last component.
        !           397: .Tp Ar old_string=new_string
        !           398: This is the System V style variable substitution.
        !           399: It must be the last modifier specified.
        !           400: .Ar Old_string
        !           401: is anchored at the end of each word, so only suffixes or entire
        !           402: words may be replaced.
        !           403: .Tp
        !           404: .Sh INCLUDE STATEMENTS AND CONDITIONALS
        !           405: Makefile inclusion and conditional structures reminiscent of the C
        !           406: programming language are provided in
        !           407: .Nm make  .
        !           408: All such structures are identified by a line beginning with a single
        !           409: dot (``.'') character.
        !           410: Files are included with either ``.include <file>'' or ``.include "file"''.
        !           411: Variables between the angle brackets or double quotes are expanded
        !           412: to form the file name.
        !           413: If angle brackets are used, the included makefile is expected to be in
        !           414: the system makefile directory.
        !           415: If double quotes are used, the including makefile's directory and any
        !           416: directories specified using the
        !           417: .Fl I
        !           418: option are searched before the system
        !           419: makefile directory.
        !           420: .Pp
        !           421: Conditional expressions are also preceded by a single dot as the first
        !           422: chraracter of a line.
        !           423: The possible conditionals are as follows:
        !           424: .Tw Ds
        !           425: .Tp Cx Ic \&.undef
        !           426: .Cx \&\ \&
        !           427: .Ar variable
        !           428: .Cx
        !           429: Un-define the specified global variable.
        !           430: Only global variables may be un-defined.
        !           431: .Tp Cx Ic \&.if
        !           432: .Cx \&\ \&
        !           433: .Op \&!
        !           434: .Cx \&\ \&
        !           435: .Ar expression
        !           436: .Cx \&\ \&
        !           437: .Op Ar operator expression ...
        !           438: .Cx
        !           439: Test the value of an expression.
        !           440: .Tp Cx Ic \&.ifdef
        !           441: .Cx \&\ \&
        !           442: .Op \&!
        !           443: .Ar variable
        !           444: .Cx \&\ \&
        !           445: .Op Ar  operator variable ...
        !           446: .Cx
        !           447: Test the value of an variable.
        !           448: .Tp Cx Ic \&.ifndef
        !           449: .Cx \&\ \&
        !           450: .Op \&!
        !           451: .Cx \&\ \&
        !           452: .Ar variable
        !           453: .Cx \&\ \&
        !           454: .Op Ar operator variable ...
        !           455: .Cx
        !           456: Test the value of an variable.
        !           457: .Tp Cx Ic \&.ifmake
        !           458: .Cx \&\ \&
        !           459: .Op \&!
        !           460: .Cx \&\ \&
        !           461: .Ar target
        !           462: .Cx \&\ \&
        !           463: .Op Ar operator target ...
        !           464: .Cx
        !           465: Test the the target being built.
        !           466: .Tp Cx Ic \&.ifnmake
        !           467: .Cx \&\ \&
        !           468: .Op \&!
        !           469: .Ar target
        !           470: .Cx \&\ \&
        !           471: .Op Ar operator target ...
        !           472: .Cx
        !           473: Test the target being built.
        !           474: .Tp Ic \&.else
        !           475: Reverse the sense of the last conditional.
        !           476: .Tp Cx Ic \&.elif
        !           477: .Cx \&\ \&
        !           478: .Op \&!
        !           479: .Cx \&\ \&
        !           480: .Ar expression
        !           481: .Cx \&\ \&
        !           482: .Op Ar operator expression ...
        !           483: .Cx
        !           484: A combination of ``.else'' followed by ``.if''.
        !           485: .Tp Cx Ic \&.elifdef
        !           486: .Cx \&\ \&
        !           487: .Op \&!
        !           488: .Cx \&\ \&
        !           489: .Ar variable
        !           490: .Cx \&\ \&
        !           491: .Op Ar operator variable ...
        !           492: .Cx
        !           493: A combination of ``.else'' followed by ``.ifdef''.
        !           494: .Tp Cx Ic \&.elifndef
        !           495: .Cx \&\ \&
        !           496: .Op \&!
        !           497: .Cx \&\ \&
        !           498: .Ar variable
        !           499: .Cx \&\ \&
        !           500: .Op Ar operator variable ...
        !           501: .Cx
        !           502: A combination of ``.else'' followed by ``.ifndef''.
        !           503: .Tp Cx Ic \&.elifmake
        !           504: .Cx \&\ \&
        !           505: .Op \&!
        !           506: .Cx \&\ \&
        !           507: .Ar target
        !           508: .Cx \&\ \&
        !           509: .Op Ar operator target ...
        !           510: .Cx
        !           511: A combination of ``.else'' followed by ``.ifmake''.
        !           512: .Tp Cx Ic \&.elifnmake
        !           513: .Cx \&\ \&
        !           514: .Op \&!
        !           515: .Cx \&\ \&
        !           516: .Ar target
        !           517: .Cx \&\ \&
        !           518: .Op Ar operator target ...
        !           519: .Cx
        !           520: A combination of ``.else'' followed by ``.ifnmake''.
        !           521: .Tp Ic \&.endif
        !           522: End the body of the conditional.
        !           523: .Tp
        !           524: .Pp
        !           525: The
        !           526: .Ar operator
        !           527: may be any one of the following:
        !           528: .Tp Cm \&|\&|
        !           529: logical OR
        !           530: .Tp Cm \&&&
        !           531: Logical AND; of higher precedence than ``''.
        !           532: .Tp
        !           533: .Pp
        !           534: As in C,
        !           535: .Nm make
        !           536: will only evaluate a conditional as far as is necessary to determine
        !           537: its value.
        !           538: Parenthesis may be used to change the order of evaluation.
        !           539: The boolean operator ``!'' may be used to logically negate an entire
        !           540: conditional.
        !           541: It is of higher precendence than ``&&''.
        !           542: .Pp
        !           543: The value of
        !           544: .Ar expression
        !           545: may be any of the following:
        !           546: .Tp Ic defined
        !           547: Takes a variable name as an argument and evaluates to true if the variable
        !           548: has been defined.
        !           549: .Tp Ic make
        !           550: Takes a target name as an argument and evaluates to true if the target
        !           551: was specified as part of
        !           552: .Cx Nm make
        !           553: .Cx \'s
        !           554: .Cx
        !           555: command line or was declared the default target (either implicitly or
        !           556: explicitly, see .MAIN) before the line containing the conditional.
        !           557: .Tp Ic empty
        !           558: Takes a variable, with possible modifiers, and evalutes to true if
        !           559: the expansion of the variable would result in an empty string.
        !           560: .Tp Ic exists
        !           561: Takes a file name as an argument and evaluates to true if the file exists.
        !           562: The file is searched for on the system search path (see .PATH).
        !           563: .Tp Ic target
        !           564: Takes a target name as an argument and evaluates to true if the target
        !           565: has been defined.
        !           566: .Tp
        !           567: .Pp
        !           568: .Ar Expression
        !           569: may also be an arithmetic or string comparison, with the left-hand side
        !           570: being a variable expansion.
        !           571: The standard C relational operators are all supported, and the usual
        !           572: number/base conversion is performed.
        !           573: Note, octal numbers are not supported.
        !           574: If the righthand value of a ``=='' or ``!='' operator begins with a
        !           575: quotation mark (``"'') a string comparison is done between the expanded
        !           576: variable and the text between the quotation marks.
        !           577: If no relational operator is given, it is assumed that the expanded
        !           578: variable is being compared against 0.
        !           579: .Pp
        !           580: When
        !           581: .Nm make
        !           582: is evaluating one of these conditional expression, and it encounters
        !           583: a word it doesn't recognize, either the ``make'' or ``defined''
        !           584: expression is applied to it, depending on the form of the conditional.
        !           585: If the form is ``.ifdef'' or ``.ifndef'', the ``defined'' expression
        !           586: is applied.
        !           587: Similarly, if the form is ``.ifmake'' or ``.ifnmake'', the ``make''
        !           588: expression is applied.
        !           589: .Pp
        !           590: If the conditional evaluates to true the parsing of the makefile continues
        !           591: as before.
        !           592: If it evaluates to false, the following lines are skipped.
        !           593: In both cases this continues until a ``.else'' or ``.endif'' is found.
        !           594: .Sh COMMENTS
        !           595: Comments begin with a hash (``#'') character, anywhere but in a shell
        !           596: command line, and continue to the end of the line.
        !           597: .Sh SPECIAL SOURCES
        !           598: .Tp Ic \&.IGNORE
        !           599: Ignore any errors from the commands associated with this target, exactly
        !           600: as if they all were preceded by a dash (``\-'').
        !           601: .Tp Ic \&.MAKE
        !           602: Execute the commands associated with this target even if the -n or -t
        !           603: options were specified.
        !           604: Normally used to mark recursive
        !           605: .Cx Nm make
        !           606: .Cx \'s .
        !           607: .Cx
        !           608: .Tp Ic \&.NOTMAIN
        !           609: Normally
        !           610: .Nm make
        !           611: selects the first target it encounters as the default target to be built
        !           612: if no target was specified.
        !           613: This source prevents this target from being selected.
        !           614: .Tp Ic \&.OPTIONAL
        !           615: If a target is marked with this attribute and
        !           616: .Nm make
        !           617: can't figure out how to create it, it will ignore this fact and assume
        !           618: the file isn't needed or already exists.
        !           619: .Tp Ic \&.PRECIOUS
        !           620: When
        !           621: .Nm make
        !           622: is interrupted, it removes any partially made targets.
        !           623: This source prevents the target from being removed.
        !           624: .Tp Ic \&.SILENT
        !           625: Do not echo any of the commands associated with this target, exactly
        !           626: as if they all were preceded by an at sign (``@'').
        !           627: .Tp Ic \&.USE
        !           628: Turn the target into
        !           629: .Cx Nm make
        !           630: .Cx \'s .
        !           631: .Cx
        !           632: version of a macro.
        !           633: When the target is used as a source for another target, the other target
        !           634: acquires the commands, sources, and attributes (except for .USE) of the
        !           635: source.
        !           636: If the target already has commands, the .USE target's commands are appended
        !           637: to them.
        !           638: .Tp
        !           639: .Sh "SPECIAL TARGETS"
        !           640: Special targets may not be included with other targets, i.e. they must be
        !           641: the only target specified.
        !           642: .Tp Ic \&.BEGIN
        !           643: Any command lines attached to this target are executed before anything
        !           644: else is done.
        !           645: .Tp Ic \&.DEFAULT
        !           646: This is sort of a .USE rule for any target (that was used only as a
        !           647: source) that
        !           648: .Nm make
        !           649: can't figure out any other way to create.
        !           650: Only the shell script is used.
        !           651: The .IMPSRC variable of a target that inherits .DEFAULT's commands is set
        !           652: to the target's own name.
        !           653: .Tp Ic \&.END
        !           654: Any command lines attached to this target are executed after everything
        !           655: else is done.
        !           656: .Tp Ic \&.IGNORE
        !           657: Mark each of the sources with the .IGNORE attribute.
        !           658: If no sources are specified, this is the equivalent of specifying the -i
        !           659: option.
        !           660: .Tp Ic \&.INTERRUPT
        !           661: If
        !           662: .Nm make
        !           663: is interrupted, the commands for this target will be executed.
        !           664: .Tp Ic \&.MAIN
        !           665: If no target is specified when
        !           666: .Nm make
        !           667: is invoked, this target will be built.
        !           668: .Tp Ic \&.MAKEFLAGS
        !           669: This target provides a way to specify flags for
        !           670: .Nm make
        !           671: when the makefile is used.
        !           672: The flags are as if typed to the shell, though the -f option will have
        !           673: no effect.
        !           674: .Tp Ic \&.PATH
        !           675: The sources are directories which are to be searched for files not
        !           676: found in the current directory.
        !           677: If no sources are specified, any previously specified directories are
        !           678: deleted.
        !           679: .Tp Ic \&.PRECIOUS
        !           680: Apply the .PRECIOUS attribute to any specified sources.
        !           681: If no sources are specified, the .PRECIOUS attribute is applied to every
        !           682: target in the file.
        !           683: .Tp Ic \&.SILENT
        !           684: Apply the .SILENT attribute to any specified sources.
        !           685: If no sources are specified, the .SILENT attribute is applied to every
        !           686: command in the file.
        !           687: .Tp Ic \&.SUFFIXES
        !           688: Each source specifies a suffix to
        !           689: .Nm make  .
        !           690: If no sources are specified, any previous specifies suffices are deleted.
        !           691: .Sh ENVIRONMENT
        !           692: .Nm Make
        !           693: utilizes the following environment variables, if they exist:
        !           694: .Ev MAKE ,
        !           695: .Ev MAKEFLAGS
        !           696: and
        !           697: .Ev MAKEOBJDIR .
        !           698: .Sh FILES
        !           699: .Dw /usr/share/mk
        !           700: .Di L
        !           701: .Dp Pa /usr/share/mk
        !           702: system makefile directory
        !           703: .Dp Pa sys.mk
        !           704: include system makefile
        !           705: .Dp Pa bsd.mk
        !           706: BSD source tree template
        !           707: .Dp Pa subdir.mk
        !           708: BSD source tree subdirectory template
        !           709: .Dp
        !           710: .Sh SEE ALSO
        !           711: .Sh HISTORY
        !           712: .Nm Make
        !           713: appeared in Version 7 AT&T UNIX.
        !           714: The
        !           715: .Nm make
        !           716: this man page describes is derived from code contributed by Adam
        !           717: de Boor.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.