From owner-freebsd-current Wed Jun 19 09:31:46 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA25903 for current-outgoing; Wed, 19 Jun 1996 09:31:46 -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 JAA25892 for ; Wed, 19 Jun 1996 09:31:41 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id CAA24620; Thu, 20 Jun 1996 02:24:30 +1000 Date: Thu, 20 Jun 1996 02:24:30 +1000 From: Bruce Evans Message-Id: <199606191624.CAA24620@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 >> .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. The .mk files are more or less guaranteed to include ../Makefile.inc and they should protect themselves against multiple inclusion. Makefiles in /usr/src should never include ../Makefile.inc. Some of them have to include ../../Makefile.inc. This alweays happens in nested directories, e.g., in routed the top-level Makefile.inc includes ../../Makefile.inc and the directories underneath it rely ony bsd.prog.mk including ../Makefile.inc (which is in routed and not in /usr/src/usr.sbin). This could be handled better if `make' handled include paths more like C compilers - most Makefiles simply want to include the Makefile.inc from a top level directory just beneath /usr/src. Bruce