Date: Wed, 19 Jun 1996 10:43:01 -0600 From: Nate Williams <nate@sri.MT.net> To: Bruce Evans <bde@zeta.org.au> Cc: nate@sri.MT.net, current@FreeBSD.org Subject: Re: (Mis)feature of the current make macros Message-ID: <199606191643.KAA06161@rocky.sri.MT.net> In-Reply-To: <199606191624.CAA24620@godzilla.zeta.org.au> References: <199606191624.CAA24620@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes: > >> .if !defined(_foo_mk_) > >> _foo_mk_= > >> .include <foo.mk> > >> .endif !_foo_mk_ > > >It works for me, but it doesn't solve the problem of the .mk files doing > >the same things. Even if we've never included <bsd.man.mk>, if we've > >included any of the other .mk files that includes ../Makefile.inc it > >shouldn't also include it. > > It solves precisely that problem. How given the example I used? I'm assuming you're using the above construct in the .mk files. > The .mk files are more or less > guaranteed to include ../Makefile.inc and they should protect themselves > against multiple inclusion. The /usr/src Makefile has: .include <bsd.prog.mk> bsd.prog.mk checks for and sets '_prog_mk_', and includes ../Makefile.inc. bsd.prog.mk sees that there is a man-page definition, so it also includes bsd.prog.mk. bsd.prog.mk checks and and sets '_man_mk_' and *also* includes ../Makefile.inc. Neither .mk files in included twice but the supporting Makefile.inc is. Am I missing something? Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606191643.KAA06161>