[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Target specific include
From: |
Karl Hegbloom |
Subject: |
Re: Target specific include |
Date: |
Thu, 07 Jun 2007 00:49:12 -0600 |
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:".