SCCS-vsn: usr.bin/make/PSD.doc/tutorial.ms 8.3
.\"
.\" %sccs.include.redist.roff%
.\"
.\"
.\" %sccs.include.redist.roff%
.\"
-.\" @(#)tutorial.ms 8.2 (Berkeley) %G%
+.\" @(#)tutorial.ms 8.3 (Berkeley) %G%
.\"
.EH 'PSD:12-%''PMake \*- A Tutorial'
.OH 'PMake \*- A Tutorial''PSD:12-%'
.\"
.EH 'PSD:12-%''PMake \*- A Tutorial'
.OH 'PMake \*- A Tutorial''PSD:12-%'
.IP \(bu 2
Comments, include statements and conditional directives
.RE
.IP \(bu 2
Comments, include statements and conditional directives
.RE
.LP
Any line may be continued over multiple lines by ending it with a
backslash.
.LP
Any line may be continued over multiple lines by ending it with a
backslash.
.Ix 0 ref flags -L
.Ix 0 ref flags -J
but you do have to be careful at times.
.Ix 0 ref flags -L
.Ix 0 ref flags -J
but you do have to be careful at times.
.LP
There are several problems you are likely to encounter. One is
that some makefiles (and programs) are written in such a way that it is
.LP
There are several problems you are likely to encounter. One is
that some makefiles (and programs) are written in such a way that it is
Since only one shell is used for all the
commands, you'll get the same file name for each command in the
script.
Since only one shell is used for all the
commands, you'll get the same file name for each command in the
script.
.LP
The other problem comes from improperly-specified dependencies that
worked in Make because of its sequential, depth-first way of examining
.LP
The other problem comes from improperly-specified dependencies that
worked in Make because of its sequential, depth-first way of examining
-.xH 2 Exercises
-.ce
-\s+4\fBTBA\fP\s0
.xH 1 Short-cuts and Other Nice Things
.LP
Based on what I've told you so far, you may have gotten the impression
.xH 1 Short-cuts and Other Nice Things
.LP
Based on what I've told you so far, you may have gotten the impression
\&.PATH.bitmap : /usr/local/X/lib/bitmaps
\&.INCLUDES : .bitmap
.DE
\&.PATH.bitmap : /usr/local/X/lib/bitmaps
\&.INCLUDES : .bitmap
.DE
PMake will place
.CW "-I/usr/local/X/lib/bitmaps" '' ``
in the
PMake will place
.CW "-I/usr/local/X/lib/bitmaps" '' ``
in the
.DE
It must be the last modifier in the chain. The search is anchored at
the end of each word, so only suffixes or whole words may be replaced.
.DE
It must be the last modifier in the chain. The search is anchored at
the end of each word, so only suffixes or whole words may be replaced.
-.xH 2 More on Debugging
-.xH 2 More Exercises
.IP (3.1)
You've got a set programs, each of which is created from its own
assembly-language source file (suffix
.IP (3.1)
You've got a set programs, each of which is created from its own
assembly-language source file (suffix
\&.po.a .o.a :
...
rm -f $(.MEMBER)
\&.po.a .o.a :
...
rm -f $(.MEMBER)