version 1.96, 2012/10/05 13:06:00 |
version 1.97, 2012/10/06 18:41:53 |
|
|
.Pq Ql \&# |
.Pq Ql \&# |
character, anywhere but in a shell |
character, anywhere but in a shell |
command line, and continue to the end of the line. |
command line, and continue to the end of the line. |
.Sh SPECIAL PREREQUISITES |
.Sh TARGET ATTRIBUTES |
.Bl -tag -width ".PRECIOUS" |
Some targets may be tagged with some specific attributes by one |
.It Ic .IGNORE |
of the |
Ignore any errors from the commands associated with this target, exactly |
.Sx SPECIAL TARGETS |
as if they all were preceded by a dash |
or |
|
.Sx SPECIAL PREREQUISITES |
|
described below. |
|
.Bl -tag -width "Ignoring errors" |
|
.It Dq Always build |
|
Run the commands associated with this target even if the |
|
.Fl n |
|
or |
|
.Fl t |
|
options were specified. |
|
Can be used to mark recursive |
|
.Nm make Ns 's , |
|
but prefer standard |
|
.Sq Ic + Ns Ar cmd . |
|
.It Dq Cheap |
|
In parallel mode, don't scan the commands for occurrences of |
|
.Nm , |
|
thus letting normal recursive |
|
.Fl j |
|
behavior apply. |
|
.It Dq Expensive |
|
In parallel mode, assume commands will invoke recursive commands. |
|
Once |
|
.Nm |
|
starts building an expensive target, it won't start building anything else |
|
until that target has finished building. |
|
.It Dq Ignoring errors |
|
Ignore any errors generating by running shell commands, exactly |
|
as if they were all preceded by a dash |
.Pq Ql \- . |
.Pq Ql \- . |
.It Ic .NOTMAIN |
.It Dq Phony |
Normally |
A phony target is a target that does not correspond to any object in the |
|
file system (more like a placeholder for a list of commands). |
|
.Pp |
|
Phony targets are always out-of-date at the start of a run, but |
.Nm |
.Nm |
selects the first target it encounters as the default target to be built |
still keeps track of when they are built (that is, when the associated |
if no target was specified. |
command list finishes running). |
This prerequisite prevents this target from being selected. |
.It Dq Precious |
.It Ic .OPTIONAL |
Don't remove the target if |
If a target is marked with this attribute and |
|
.Nm |
.Nm |
can't figure out how to create it, it will ignore this fact and assume |
is interrupted in the middle of building it. |
the file isn't needed or already exists. |
.It Dq Silent |
.It Ic .PRECIOUS |
Do not display shell commands before running them, exactly as |
When |
if they were all preceded by a |
|
.Sq @ . |
|
.El |
|
.Sh SPECIAL TARGETS |
.Nm |
.Nm |
is interrupted, it removes any partially made targets. |
recognizes standard special targets: |
This prerequisite prevents the target from being removed. |
.Bl -tag -width ".NOTPARALLEL" |
|
.It Ic .DEFAULT |
|
If there is a |
|
.Ic .DEFAULT |
|
target rule, with commands but no prequisites, and |
|
.Nm |
|
can't figure out another way to build a target, it will use that |
|
list of commands, setting |
|
.Va \&< |
|
and |
|
.Va @ |
|
appropriately. |
|
.It Ic .IGNORE |
|
Mark its prerequisites as |
|
.Dq Ignoring errors . |
|
.Pp |
|
If the list of prerequisites is empty, apply that to all targets, exactly |
|
like the |
|
.Fl i |
|
command-line option. |
|
.It Ic .PRECIOUS |
|
Mark its prerequisites as |
|
.Dq Precious . |
|
.Pp |
|
If the list of prerequisites is empty, apply that to all targets. |
.It Ic .SILENT |
.It Ic .SILENT |
Do not echo any of the commands associated with this target, exactly |
Mark its prerequisites as |
as if they all were preceded by an at sign |
.Dq Silent . |
.Pq Ql @ . |
.Pp |
.It Ic .USE |
If the list of prerequisites is empty, apply that to all targets, exactly |
Turn the target into |
like the |
.Nm make Ns 's |
.Fl s |
version of a macro. |
command-line option. |
When the target is used as a prerequisite for another target, the other target |
.It Ic .SUFFIXES |
acquires the commands, prerequisite, and attributes (except for |
See |
.Ic .USE ) |
.Sx INFERENCE RULES . |
of the |
|
prerequisite. |
|
If the target already has commands, the |
|
.Ic .USE |
|
target's commands are appended |
|
to them. |
|
.It Ic .WAIT |
|
If |
|
.Ic .WAIT |
|
appears in a dependency line, the prerequisites that precede it are |
|
made before the prerequisites that follow it in the line. |
|
Loops are not |
|
detected and targets that form loops will be silently ignored. |
|
.El |
.El |
.Sh SPECIAL TARGETS |
.Pp |
Special targets may not be included with other targets, i.e., they must be |
and also some other special targets as an extension: |
the only target specified. |
|
.Bl -tag -width ".NOTPARALLEL" |
.Bl -tag -width ".NOTPARALLEL" |
.It Ic .BEGIN |
.It Ic .BEGIN |
Any command lines attached to this target are executed before anything |
Command lines attached to this target are executed before anything |
else is done. |
else is done. |
.It Ic .CHEAP |
.It Ic .CHEAP |
In parallel mode, don't scan the commands for |
Mark its prerequisites as |
.Nm , |
.Dq Cheap . |
let recursive |
|
.Fl j |
|
behavior apply. |
|
.It Ic .DEFAULT |
|
This is sort of a |
|
.Ic .USE |
|
rule for any target (that was used only as a prerequisite) that |
|
.Nm |
|
can't figure out any other way to create. |
|
Uses only the commands. |
|
The |
|
.Ic .IMPSRC |
|
variable of a target that inherits |
|
.Ic .DEFAULT Ns 's |
|
commands is set |
|
to the target's own name. |
|
.It Ic .END |
.It Ic .END |
Any command lines attached to this target are executed after everything |
Command lines attached to this target are executed at the end of a successful |
else is done. |
run. |
.It Ic .EXPENSIVE |
.It Ic .EXPENSIVE |
In parallel mode, don't scan the commands for |
Mark its prerequisites as |
.Nm , |
.Dq Expensive . |
assume the whole target invokes recursive commands and don't start |
.It Ic .INTERRUPT |
commands for other targets until that target is finished building. |
Command lines attached to this target are executed if |
.It Ic .IGNORE |
.Nm |
Mark each of the prerequisites with the |
is interrupted by a SIGINT. |
.Ic .IGNORE |
|
attribute. |
|
If no prerequisites are specified, this is the equivalent of specifying the |
|
.Fl i |
|
option. |
|
.It Ic .MADE |
.It Ic .MADE |
Mark all prerequisites as being up-to-date. |
Mark its prerequisites as being up-to-date. |
.It Ic .MAKE |
.It Ic .MAKE |
Execute the commands associated with this target even if the |
Mark its prerequisites as |
.Fl n |
.Dq Always build . |
or |
Prefer standard |
.Fl t |
|
options were specified. |
|
Can be used to mark recursive |
|
.Nm make Ns 's , |
|
prefer standard |
|
.Sq Ic + Ns Ar cmd . |
.Sq Ic + Ns Ar cmd . |
.It Ic .MAIN |
.It Ic .MAIN |
If no target is specified when |
If no target is specified when |
|
|
.It Ic .NO_PARALLEL |
.It Ic .NO_PARALLEL |
Same as above, for compatibility with other pmake variants. |
Same as above, for compatibility with other pmake variants. |
.It Ic .ORDER |
.It Ic .ORDER |
The named targets are made in sequence. |
The list of prerequisites should be built in sequence. |
.\" XXX: NOT YET!!!! |
.\" XXX: NOT YET!!!! |
.\" .It Ic .PARALLEL |
.\" .It Ic .PARALLEL |
.\" The named targets are executed in parallel mode. If no targets are |
.\" The named targets are executed in parallel mode. If no targets are |
.\" specified, then all targets are executed in parallel mode. |
.\" specified, then all targets are executed in parallel mode. |
.It Ic .PATH |
.It Ic .PATH |
The prerequisites are directories which are to be searched for files not |
The prerequisites define a search path: directories that will be searched |
found in the current directory. |
for files not found in the current directory. |
If no prerequisites are specified, any previously specified directories are |
If no prerequisites are specified, any previously specified directories are |
deleted. |
deleted. |
.It Ic .PATH\fIsuffix\fR |
.It Ic .PATH\fI.suffix\fR |
The prerequisites are directories which are to be searched for suffixed files |
This target is only valid if .suffix is a currently valid suffix. |
not found in the current directory. |
The prerequisites defines a search path for files ending in that suffix. |
|
For files not found in the current directory, |
.Nm |
.Nm |
first searches the suffixed search path, before reverting to the default |
will first look in that path, before reverting to the default search path. |
path if the file is not found there. |
|
.It Ic .PHONY |
.It Ic .PHONY |
Apply the |
Mark its prerequisites as |
.Ic .PHONY |
.Dq Phony |
attribute to any specified prerequisites. |
targets. |
Targets with this attribute are always |
.El |
considered to be out of date. |
.Sh SPECIAL PREREQUISITES |
.It Ic .PRECIOUS |
.Bl -tag -width ".PRECIOUS" |
Apply the |
.It Ic .NOTMAIN |
.Ic .PRECIOUS |
Normally |
attribute to any specified prerequisites. |
.Nm |
If no prerequisites are specified, the |
selects the first target it encounters as the default target to be built |
.Ic .PRECIOUS |
if no target was specified. |
attribute is applied to every |
This prerequisite prevents this target from being selected. |
target in the file. |
.It Ic .OPTIONAL |
.It Ic .SILENT |
If a target is marked with this attribute and |
Apply the |
.Nm |
.Ic .SILENT |
can't figure out how to create it, it will ignore this fact and assume |
attribute to any specified prerequisites. |
the file isn't needed or already exists. |
If no prerequisites are specified, the |
.It Ic .USE |
.Ic .SILENT |
Turn the target into |
attribute is applied to every |
.Nm make Ns 's |
command in the file. |
version of a macro. |
.It Ic .SUFFIXES |
When the target is used as a prerequisite for another target, the other target |
See |
acquires the commands, prerequisites, and attributes (except for |
.Sx INFERENCE RULES . |
.Ic .USE ) |
|
of the |
|
prerequisite. |
|
If the target already has commands, the |
|
.Ic .USE |
|
target's commands are appended |
|
to them. |
|
.It Ic .WAIT |
|
If |
|
.Ic .WAIT |
|
appears in a dependency line, the prerequisites that precede it are |
|
made before the prerequisites that follow it in the line. |
|
Loops are not |
|
detected and targets that form loops will be silently ignored. |
.El |
.El |
.Sh ENVIRONMENT |
.Sh ENVIRONMENT |
.Nm |
.Nm |