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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Making Libraries<br />

A library is a file containing a collection of object files. To make a library, you specify<br />

it as a target with the .LIBRARY attribute and list its prerequisites. The prerequisites<br />

should be the object members that are to go into the library.<br />

Conditionals<br />

make tries to handle the old library construct format in a sensible way. When it<br />

finds lib(member), it declares the lib portion as a target with the .LIBRARY attribute<br />

and the member portion as a prerequisite of the lib target. To make the library<br />

properly, old makefile scripts using this format must name the lib as a target and<br />

must try to bring it up to date. The same thing happens for any target of the form<br />

lib((entry)). These targets have an additional feature in that the entry target has the<br />

.SYMBOL attribute set automatically.<br />

You specify the conditional expression as follows:<br />

.IF expression<br />

... if text ...<br />

.ELSE<br />

... else text ...<br />

.END<br />

or:<br />

.IF expression<br />

... if text ...<br />

.ELSIF expression2<br />

... elsif text ...<br />

.ELSE<br />

... else text ...<br />

.END<br />

The .ELSE or .ELSIF portion is optional, and you can nest the conditionals (that is,<br />

the text may contain another conditional). The .IF, .ELSE, .ELSIF, and .END<br />

conditionals must start in the first column of the line. expression or expression2 can<br />

have one of three forms:<br />

string<br />

is true if the given string is nonnull,<br />

string == string<br />

is true if the two strings are equal, and:<br />

string != string<br />

make<br />

is true if the two strings are not equal. Typically, one or both strings contain macros,<br />

which make expands before making comparisons. make also discards white space<br />

at the start and end of the text portion before the comparison. This means that a<br />

macro that expands to nothing but white space is considered a null value for the<br />

purpose of the comparison. If a macro expression needs to be compared with a null<br />

string, compare it to the value of the macro $(NULL).<br />

The text enclosed in the conditional construct must have the same format that it<br />

would have outside the conditional. In particular, make assumes that anything that<br />

starts with a tab inside the conditional is a recipe line. This means that you cannot<br />

use tabs to indent text inside the conditional (except, of course, for recipe lines,<br />

which always begin with tabs).<br />

Chapter 2. Shell command descriptions 409

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

Saved successfully!

Ooh no, something went wrong!