Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 1996 02:24:30 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, nate@sri.MT.net
Cc:        current@FreeBSD.org
Subject:   Re: (Mis)feature of the current make macros
Message-ID:  <199606191624.CAA24620@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 	.if !defined(_foo_mk_)
>> 	_foo_mk_=
>> 	.include <foo.mk>
>> 	.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 <bsd.man.mk>, 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



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