Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
Opus Make Quick Reference

Opus Make Quick Reference

Ratings: (0)|Views: 909|Likes:
Published by nomaddarcy
Make Reference
Make Reference

More info:

Published by: nomaddarcy on Mar 27, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/29/2010

pdf

text

original

 
Target Attributes
Target Attributes
Target Attributes assign certain properties to targets. There are two forms:target [...] [attribute ...] : [sources ...]attribute [...] : [target ...]Both forms assign attributes to the targets on the dependency line. If no targets are listed, the attribute isinherited by all targets subsequently defined.The negation of .
 ATTRIBUTE 
is .NO
 ATTRIBUTE 
.
Attribute Description
.ALWAYSAlways rebuild named target..CHAINChain inference rules..DEPSRCNamed targets are dependent sources..IGNOREIgnore non-zero return status..INFERForce inference rule check..LIBRARYNamed targets are object libraries..MAKEOverride "-n", "-q", and "-t" command-line options..MISERUse memory miser for named target (MS-DOS only.).NOCOMPARETarget(s) named are not timestamp-compared when appearing as a source..NODEFAULTTarget(s) named are not the default target..PHONYSame as .ALWAYS and .NOCOMPARE..PRECIOUSDo not delete non-zero return status targets..REREADReread target timestamp and location from disk..RULEIndicates dependency line is an inference rule..QUEUEIndicates shell lines may be queued..SILENTDo not display executing shell lines..VCSTOUCHSet extracted source file timestamp to VCS version timestamp.
Special Targets
Special targets execute shell lines at specific times during the Make process.
Target Usage
.AFTER : [source...] Build sources and execute shell lines after Make has built its last target..BEFORE : [source...] Build sources and execute shell lines before Make builds the first target..DEFAULT[
.ext 
]Supplies shell lines which can be used to update targets of extension
.ext 
.
 
.DEFAULT[
.ext 
] is converted to an equivalent "%[
.ext 
] : " rule..
 XXX 
 _GETWhere
 XXX 
is one of "PVCS", "RCS", "SS", "TLIB". These special targets supply shelllines and attributes for rules that "get" files from the named version control system.
 Directives
"Percent" Directives
The following directives can be used at read time, run time, or at both times.
Conditional Type Action
%if 
condition
read/runStart a conditional bloc%ifdef 
macro
read/runStart a conditional bloc%ifndef 
macro
read/runStart a conditional bloc%elif/elseif 
condition
read/runContinue the conditional bloc%elseread/runStart default conditional bloc%endifread/runEnd the conditional bloc 
Looping TypeAction
%foreach
name
[in]
list 
read/runLoop for each
name
in
list 
%while
condition
runLoop while
condition
is true%endread/runEnd the loop%breakread/runInterrupt and quit loop%continueread/runInterrupt and restart loop 
OtherTypeAction
%abort [
 status
] [
msg 
]read/runDisplay
msg 
then abort with exit
 status
.%chdir 
directory
read/runChange current working directory.%do
target 
[
macros
]runMake a subroutine call.
macros
are set temporarily.%echo [-n]
message
read/runDisplay
message
. Newline after unless "-n".%error [
 status
] [
msg 
]read/runDisplay
msg 
then use
 status
as directive status.%exec
command line
readExecute the
command line
%getenv
envar 
[
macro
]read/runDefine
macro
from environment variable
envar 
.
 
%include [<"]
 file
[>"]readInclude contents of makefile
 file
.%restart [
 flags
]runStart make again.%set
name
[+]=
value
read/runSet macro
name
to
value
.%setenv
name
[=]
value
read/runSet environment variable
name
to
value
.%undef 
name
read/runUndefine a macro.Either % or ! may be used as the directive character. Placing the directive character in the first column of themakefile makes that directive read-time. Otherwise the directive is run-time. Whitespace is allowed between thedirective character and the directive name. 
Conditional Expressions
The %if, %elif, and %while directives can use all of the following conditional expressions.
Simple ExpressionsValue
value
'
value
'"
value
"If 
value
is the number zero the expression is 0, else it is 1. Single or double quotesmust be placed around
value
if it contains spaces or if it is null. 
OperatorsValue
value1 == value21 if value1 is equal to value2, else 0.value1 != value21 if value1 is not equal to value2, else 0.value1 < value21 if value1 is less than value2, else 0.value1 <= value21 if value1 is less than or equal to value2, else 0.value1 > value21 if value1 is greater than value2, else 0.value1 >= value21 if value1 is greater than or equal to value2, else 0.If both values are numbers, the comparison is numerical, else alphabetical. If either value contains spaces or isnull, it must be enclosed in single or double quotes. The case sensitivity of the string comparison is the same asfor target names and is set with the
.CASE_TARGET
and
.NOCASE_TARGET
directives. 
Built-in FunctionsValue
%defined(
name
)1 if macro
name
is defined.%dir(
name
)1 if file
name
is a directory.%empty(
name
)1 if file
name
is empty (zero length).%exists(
name
)1 i
name
is a file or directory.%file(
name
)1 i
name
is a file.%length(
name
)The number of characters in $(
name
).%make(
name
)1 i
name
is a command-line target.

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
gopi liked this
Dharmesh Patel liked this
dypak liked this
sudhierk liked this
Isamu Wang liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->