From owner-freebsd-current Wed Jun 19 08:29:37 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA19633 for current-outgoing; Wed, 19 Jun 1996 08:29:37 -0700 (PDT) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA19624 for ; Wed, 19 Jun 1996 08:29:32 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id JAA05885; Wed, 19 Jun 1996 09:29:24 -0600 Date: Wed, 19 Jun 1996 09:29:24 -0600 From: Nate Williams Message-Id: <199606191529.JAA05885@rocky.sri.MT.net> To: Bruce Evans Cc: current@FreeBSD.org, nate@sri.MT.net Subject: Re: (Mis)feature of the current make macros In-Reply-To: <199606191223.WAA15182@godzilla.zeta.org.au> References: <199606191223.WAA15182@godzilla.zeta.org.au> Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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 ? 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 > .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 , if we've included any of the other .mk files that includes ../Makefile.inc it shouldn't also include it. Nate