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.

make<br />

Makefiles<br />

A makefile is a text file that describes the dependencies between various files. It<br />

normally contains a list of targets and identifies the prerequisites on which each<br />

depends. It also contains a series of instructions, called recipes, which describe the<br />

actions to be taken if a given target is out of date with its prerequisites.<br />

By default, if you do not specify the –f option, make looks for a file in your current<br />

directory named makefile. If it does not find this file, it searches your current<br />

directory for a file named Makefile. If make finds either file, it uses this file as your<br />

makefile.<br />

You can change the default makefiles with the .MAKEFILES special target. This target<br />

is already specified in the startup.mk file. See “Special Target Directives” on page<br />

404 for more information.<br />

Macro Definitions<br />

Macro definitions can appear on the command line or in makefiles. Macro<br />

definitions on the command line overrule definitions in makefiles; makefile<br />

definitions never overrule command-line definitions. Macro definitions on the<br />

command line may not have any white space between the macro name and the =<br />

character.<br />

Macro definitions may take several forms.<br />

macro = string<br />

is the usual form. If string contains macro references, make does not expand them<br />

when the macro is defined, but when the macro itself is expanded.<br />

macro := string<br />

expands macros inside string before assigning a value to macro.<br />

macro += string<br />

adds string to the previous value of macro.<br />

You can use any amount of white space on both sides of macro operators. make<br />

defines the name macro to have the value string and replaces it with that value<br />

whenever it is used as $(macro) or ${macro} within the makefile. It is possible to<br />

specify a $(macro_name) or ${macro_name} macro expansion, where<br />

macro_name contains more $(....) or ${...} macro expansions itself.<br />

Normally, make does not include white space at the beginning and end of string in<br />

the definition of macro; however, it never strips white space from macros imported<br />

from the environment.<br />

If you want to include white space in a macro definition specified on the make<br />

command line, you must enclose the definition in quotes.<br />

make resolves macro definitions in the following order:<br />

1. Macro definitions in the built-in rules<br />

2. Macro definitions on the command line associated with the –D option<br />

3. Macro definitions in the startup file<br />

4. Contents of the environment<br />

5. Macro definitions in the makefiles (in the order they appear)<br />

6. Macro definitions on the command line without the –D option<br />

394 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

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

Saved successfully!

Ooh no, something went wrong!