Date: Thu, 20 Jun 1996 03:04:42 +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: <199606191704.DAA25855@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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> >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 <bsd.prog.mk> and let ../Makefile.inc include <bsd.prog.mk>. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606191704.DAA25855>