tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: dependfile preference list
On Thu, Apr 19, 2012 at 09:12:33AM -0700, Simon J. Gerraty wrote:
> > > .MAKE.DEPENDFILE_PREFERENCE
> > > The ordered list of makefile names (default
> > > `${.MAKE.DEPENDFILE:T}') that make will look for to
> > > read
> > > dependencies from. Only the first found will be
> > > read.
> >
> >Is there some reason this has to be a builtin and not just a piece of
> >logic in a make library that wants to do this sort of thing?
>
> Yes, I think so. Adoption of meta mode, is much easier if it can be
> seamless. That is, the 1000's of makefiles that make up the bulk of the
> tree "just work" either way.
I do not see how this is relevant.
> I've just finished such a conversion of a very large tree at work with
> many active developers. It was a pure cross-build environment.
> It took over a year and except for the last few months most developers
> were largely unimpacted (unaware).
>
> We build the entire tree (much bigger than say NetBSD) for over a
> dozen architectures - in parallel in a single pass. For a full tree
> build the 0th bmake reads several thousand makefiles (Makefile.depend*)
> before starting sub-makes all over the place. I'm thinking I need to
> make the job scheduling better - ie. don't start a submake unless you
> can give it several tokens.
> The real benefit for most developers though, is that from anywhere
> in a clean tree, they can run make and build only and exactly what is
> needed for that directory.
>
> Being able to set .MAKE.DEPENDFILE (default .depend) is a big part of
> that.
I don't see how.
Somewhere, in some file make reads and processes, you have a depend
rule that populates .depend or Makefile.depend or
Makefile.depend.${MACHINE}. Or maybe it's part of a build rule, but it
isn't actually different that way.
depend:
frob $(STUFF) > $(DEPENDFILE)
There is no reason to add a new special facility to tell make how to
read $(DEPENDFILE) when all you need to do is add
.-include "$(DEPENDFILE)"
to the same file or some other suitable place.
> That and thinking about how to make this more palatable to the broader
> BSD community, prompted the introduction of .MAKE.DEPENDFILE_PREFERENCE.
>
> Yes, it *could* be done with makefiles but given
> .MAKE.MAKEFILE_PREFERENCE,
> .MAKE.DEPENDFILE_PREFERENCE seemed natural and will allow a more elegant
> solution. Which is also important for getting people to adopt something
> new.
I don't see that adding extra unnecessary knobs is elegant.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index