optionally include file within a Makefile

Simon L. Nielsen simon at FreeBSD.org
Thu Dec 18 17:22:26 PST 2003


On 2003.12.18 20:13:16 -0500, Dan Langille wrote:
> On 18 Dec 2003 at 19:02, Dan Langille wrote:
> 
> > My goal is provide a way to override values in a Makefile with values
> > from a local config file.
> 
> I'm getting further.  What's the proper way to do an include?

Perhaps (not tested, so there may be typos):

.if exists(${HOME}/.bacula-regress)
.include "${HOME}/.bacula-regress"
.endif

or something along those lines.  The make(1) manual page contains a lot
of useful information.

-- 
Simon L. Nielsen
FreeBSD Documentation Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20031219/2e46ab2f/attachment.bin


More information about the freebsd-hackers mailing list