Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 1996 09:29:24 -0600
From:      Nate Williams <nate@sri.MT.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@FreeBSD.org, nate@sri.MT.net
Subject:   Re: (Mis)feature of the current make macros
Message-ID:  <199606191529.JAA05885@rocky.sri.MT.net>
In-Reply-To: <199606191223.WAA15182@godzilla.zeta.org.au>
References:  <199606191223.WAA15182@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes:
> >I noticed this with the PC-CARD stuff, but if you have a man-page
> >definition, ../Makefile.inc gets included twice.  Normally this isn't a
> >problem, but in the case where you set something with '+=' you'll end up
> >with it added to the variable twice.
> 
> This was fixed in rev.1.5 of bsd.man.mk but I broke it again in rev.1.6.
> 
> >Is there any Makefile that only includes <bsd.man.mk>?  If so, should
> >it?  If not, we can remove the inclusion of ../Makefile.inc.
> 
> I don't think so.  We don't have a clear distinction between the primary
> and the secondary .mk files.  The secondary ones certainly shouldn't
> include things that the primary ones have already included.  Perhaps
> all .mk files should be idempotent and self-sufficient like all .h files
> should be.
> 
> 	.if !defined(_foo_mk_)
> 	_foo_mk_=
> 	.include <foo.mk>
> 	.endif !_foo_mk_
> 
> Is this the right style?   .ifndef works but is never used in *.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.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606191529.JAA05885>