Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
m
make(1) make(1)
SHELL=/usr/bin/sh
or a suitable equivalentshould be put in the macro definition section of the makefile.
Suffixes
Target and/or dependent names often have suffixes. Knowledge about certain suffixes is built into make
and used to identify appropriate inference rules to be applied to update a target (see the section on Infer-
ence Rules). The current default list of suffixes is:
.o .c .c˜ .C .C˜ .cxx .cxx˜ .cpp .cpp˜ .cc .cc˜
.y .y˜ .l .l˜ .L .L˜ .Y .Y˜ .s .s˜ .sh .sh˜
.h .h˜ .H .H˜ .p .p˜ .f .f˜ .r .r˜
These suffixes are defined as the dependents of the special built-in target .SUFFIXES. This is done
automatically by make.
Additional suffixes can be specified in a makefile as the dependents list for .SUFFIXES. These additional
values are added to the default values. Multiple suffix lists accumulate. The order of the suffix list is
significant (see the Inference Rules section). If the user wishes to change the order of the suffixes, he must
first define .SUFFIXES with a null dependent list, which clears the current value for
.SUFFIXES, and
then define
.SUFFIXES with the suffixes in the desired order. The list of suffixes built into
make on any
machine can be displayed by:
make -fp - 2>/dev/null </dev/null
The list of built-in suffixes incorporated with the definitions in a given makefile called
mymakefile can be
displayed by:
make -fp mymakefile 2>/dev/null </dev/null
Inference Rules
Certain target or dependent names (such as those ending with .o) have inferable dependents such as
.c
and .s, etc. If no update commands for such a name appear in the makefile, and if an inferable dependent
file exists, that dependent file is compiled to update the target. In this case, make has inference rules that
allow building files from other files by examining the sufxes and determining an appropriate inference rule
to use. There are currently default inference rules defined for:
Single Suffix Rules
.c .c˜
.C .C˜ .cxx .cxx˜ .cpp .cpp˜ .cc .cc˜
.sh .sh˜
.p .p˜
.f .f˜
.r .r˜
Double Suffix Rules
.c.o .c˜.o .c˜.c .c.a .c˜.a
.C.o .C˜.o .C˜.C .C.a .C˜.a
.cxx.o .cxx˜.o .cxx˜.cxx .cxx.a .cxx˜.a
.cpp.o .cpp˜.o .cpp˜.cpp .cpp.a .cpp˜.a
.cc.o .cc˜.o .cc˜.cc .cc.a .cc˜.a
.s.o .s˜.o .s˜.a
.p.o .p˜.o .p˜.p .p.a .p˜.a
.f.o .f˜.o .f˜.f .f.a .f˜.a
.r.o .r˜.o .r˜.r .r.a .r˜.a
.y.o .y˜.o .y.c .y˜.c
.l.o .l˜.o .l.c
.h˜.h .H˜.H .hxx˜.hxx .hpp˜.hpp
.C.o .C˜.o .C.a .C˜.a
.L.C .L.o .L˜.C .L˜.L .L˜.o
.Y.C .Y.o .Y˜.C .Y˜.Y .Y˜.o
Double suffix inference rules (.c.o) define how to build x.o from x.c. Single suffix inference rules (.c)
define how to build x from x.c. In effect, the first suffix is null. Single sufx rules are useful for building
targets from only one source file; e.g., shell procedures and simple C programs.
Section 1512 5 HP-UX Release 11i: December 2000
___
___