From owner-freebsd-current Wed Jun 19 09:43:15 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA27883 for current-outgoing; Wed, 19 Jun 1996 09:43:15 -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 JAA27871 for ; Wed, 19 Jun 1996 09:43:12 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id KAA06161; Wed, 19 Jun 1996 10:43:01 -0600 Date: Wed, 19 Jun 1996 10:43:01 -0600 From: Nate Williams Message-Id: <199606191643.KAA06161@rocky.sri.MT.net> To: Bruce Evans Cc: nate@sri.MT.net, current@FreeBSD.org Subject: Re: (Mis)feature of the current make macros In-Reply-To: <199606191624.CAA24620@godzilla.zeta.org.au> References: <199606191624.CAA24620@godzilla.zeta.org.au> Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Bruce Evans writes: > >> .if !defined(_foo_mk_) > >> _foo_mk_= > >> .include > >> .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 , 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 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