From owner-freebsd-current Wed Jun 19 10:06:25 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA00418 for current-outgoing; Wed, 19 Jun 1996 10:06:25 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA00412 for ; Wed, 19 Jun 1996 10:06:22 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id DAA25855; Thu, 20 Jun 1996 03:04:42 +1000 Date: Thu, 20 Jun 1996 03:04:42 +1000 From: Bruce Evans Message-Id: <199606191704.DAA25855@godzilla.zeta.org.au> To: bde@zeta.org.au, nate@sri.MT.net Subject: Re: (Mis)feature of the current make macros Cc: current@FreeBSD.org Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> It solves precisely that problem. >How given the example I used? I'm assuming you're using the above >construct in the .mk files. I lost the original example. Of course you have to protect against multiple inclusion everywhere it might happen and be a problem. >> 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? The protection for ../Makefile.inc. This has to be in *.mk and not in the individual Makefile.inc's because one place's ../Makefile.inc is another place's ../../Makefile.inc. *.mk really shouldn't be including ../Makefile.inc since it's an application header but it's too hard to change now. Perhaps the average Makefile should have included ../Makefile.inc instead of and let ../Makefile.inc include . Bruce