October 2000
Intermediate to advanced
432 pages
9h 9m
English
'Makefile's have a rather particular syntax that can trouble new users. There are many implementations of make, some of which provide non-portable extensions. An abridged description of the syntax follows. For portability, this syntax may be stricter than you might be used to.
Comments start with a '#' and continue until the end of line. They may appear anywhere except in command sequences—if they do, they will be interpreted by the shell running the command. The following Makefile shows three individual targets with dependencies on each:
target1: dep1 dep2 ... depN <tab> cmd1 <tab> cmd2 <tab> ... <tab> cmdN target2: dep4 dep5 <tab> cmd1 <tab> cmd2 dep4 dep5: <tab> cmd1
Target rules start at the beginning of a line and ...
Read now
Unlock full access