16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: If you specify the –e options, make reads the makefiles before reading the<br />

contents of the environment. If you specify the –E option, make does not<br />

read the contents of the environment.<br />

If a macro is already defined when make encounters a new definition for it, the new<br />

definition replaces the old one. For example, a macro definition for name on the<br />

command line overrides a definition for name in the makefile. You can use the –v<br />

option to display macro assignments, as make performs them.<br />

Macro Modifiers<br />

make supports macro expansions of the form:<br />

$(macro_name:modifier_list:modifier_list:...)<br />

Possible modifiers are:<br />

^"string″<br />

Prefix tokens<br />

+"string″<br />

Suffix tokens<br />

b File portion of all pathnames, without suffix<br />

d Directory portion of all pathnames<br />

f File portion of all pathnames, including suffix<br />

l All characters mapped to lowercase<br />

s/pat/string/<br />

Simple pattern substitution (you can use any character to separate the<br />

pattern from the substitution text)<br />

suffix=string<br />

Suffix replacement<br />

t"separator″<br />

Tokenization with given separator<br />

u All characters mapped to uppercase<br />

You can specify macro modifiers in either uppercase or lowercase. For example, the<br />

macro assignment:<br />

test = D1/D2/d3/a.out f.out d1/k.out<br />

produces the following expansion:<br />

$(test:d) → D1/D2/d3 . d1<br />

$(test:b) → a f k<br />

$(test:f) → a.out f.out k.out<br />

${test:db} → D1/D2/d3/a f d1/k<br />

${test:s/out/in} → D1/D2/d3/a.in f.in d1/k.in<br />

$(test:f:t"+") → a.out+f.out+k.out<br />

$(test:t"+") → D1/D2/d3/a.out+f.out+d1/k.out<br />

$(test:u) → D1/D2/D3/A.OUT F.OUT D1/K.OUT<br />

$(test:l) → d1/d2/d3/a.out f.out d1/k.out<br />

$(test:^"/rd/") → /rd/D1/D2/d3/a.out /rd/f.out /rd/d1/k.out<br />

$(test:+".Z") → D1/D2/d3/a.out.Z f.out.Z d1/k.out.Z<br />

Runtime Macros<br />

Runtime macros can take on different values for each target.<br />

$@ The full target name. When building a normal target, this macro evaluates<br />

make<br />

Chapter 2. Shell command descriptions 395

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!