Date: Sat, 29 Aug 1998 17:54:40 -0600 From: Warner Losh <imp@village.org> To: committers@freebsd.org Subject: Re: make.conf Message-ID: <199808292354.RAA03812@harmony.village.org> In-Reply-To: Your message of "Sat, 29 Aug 1998 22:38:11 -0000." <199808292238.WAA01362@veda.is> References: <199808292238.WAA01362@veda.is>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199808292238.WAA01362@veda.is> Adam David writes: : OK, is there any way of detecting which part of the tree is being built : that can be done without changing practically every Makefile? Then the : relevant included file could be selected on that basis. Or is there a : suitable macro that would expand to the path of the current Makefile : and it could be worked out from there? Not easily. About the best that can be hoped for in this case is to have, say, ../mk.conf included always. This would mean that all non-leaf dirs would need this file :-(. In all cases except the top level, it would just include ../mk.conf. Sounds wasteful just for this sort of thing. The top level mk.conf would include /etc/make.conf (which would include make.conf.local or whatever, I don't care). Either make would have to be modified to do this automatically (he holds his nose), or we'd have to add .include ../mk.conf to all Makefiles in the tree. There are at least two reasons why things need to be included before the Makefile is run: 1) So things like OBJFORMAT (or is that BINFORMAT) have the desired effect on those makefiles that need to know the format (although it could be argued that they could include themselves, since LIBDIR, et al, can be made to happen after make.conf is included). 2) Things like USA_RESIDENT or HAVE_SOCKS or whatever can have their desired effect. Again, one could argue that you'd want to include those only in the those files that want that. A less radical approach would be to take the include of /etc/make.conf out of sys.mk and have it included in bsd.own.mk like is done in Net/OpenBSD. I think that this would go a long way towards unpolluting the name space, at a fairly minimal cost in terms of what needs to change. The cost here would be to have an extra include of bsd.own.mk where they need to do things conditionally. /usr/src/Makefile already has this in it. However, I'm sure there are problems with this as well. However, I'm not going to mess with any of this until a post 3.0 world because it is such a GLOBAL change that I don't want to, say, break some port that depends on having sys.mk include /etc/make.conf for some reason or another. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808292354.RAA03812>