On Tue, 2007-06-05 at 15:54 +0000, sharan basappa wrote:
> In one of the book on make, I found following rule
> 
> all:
> include lib/codec/module.mk
> include lib/db/module.mk
> 
> Does this mean that the specified make files are included only if target
> all is specified ?

No, since they are written flush left.  To be commands for the "all:"
target they would need a Tab character in front of them.  To be
optionally included, they need to be wrapped in 'if' statements.  There
is probably a way to have an 'if' test the target your Makefile was
called with, and I bet it's documented, but you'll have to put it
together since I don't recall seeing a recipe for it in there.

I would have written the above with at least one blank line after the
"all:".





_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to