[PROPOSAL] To retire autoconf for 4.1

Andrew Bartlett abartlet at samba.org
Tue May 21 06:40:31 MDT 2013


On Tue, 2013-05-21 at 14:16 +0200, Michael Adam wrote:
> On 2013-05-21 at 21:10 +1000, Andrew Bartlett wrote:
> > On Tue, 2013-05-21 at 12:51 +0200, Volker Lendecke wrote:
> > > On Tue, May 21, 2013 at 12:28:53PM +0200, Jelmer Vernooij wrote:
> > > > IIRC
> > > > 
> > > > ./buildtools/bin/waf build --targets=smbtorture
> > > > 
> > > > should rebuild just smbtorture.
> > > 
> > > Ah, another one: When coding larger changes, in autoconf I
> > > like the ability to just compile one .o file. For example, I
> > > frequently do a "make smbd/open.o" for example if I mess
> > > with that. So far I have not found a way to do that in waf
> > > quickly. Any hint for that?
> > 
> > You could determine the command waf is using (make V=1 should do it),
> > and manually invoke gcc yourself.
> > 
> > It's not pretty, but it should allow you to handle this unusual case. 
> 
> Well, it is not so very unusual for a developer working on a
> certain set of code files to want to quickly check whether the
> changes compile.

If you are only changing those files, and have done a full compile in
the recent past, then a simple 'make' will do just that.  Yes, you may
not want to wait for it to link, but you can reduce that if you must by
specifying a target, but once it is at that point you know that it does
compile.  

> If I remember this correctly, the main difficulty in providing
> something like this for the waf build lies in the fact that our
> object files are generated as basename_<number>.o when the
> source file is basename.c, and number is generated by waf.
> 
> So let me record a couple of wishes that target at reducing the
> turnaround times for builds in a development process:
> 
> - Can we create targets for specific objects, to just
>   compile a single C file?
> 
> - When building a certain binary target, can we change
>   waf's mode to only compile the needed code files?
>   (linking is already reduced, as Volker confirmed)

This is caused by the waf stages.  The difficultly with removing these
is that we then must ensure our dependencies are absolutely perfect, as
otherwise the builds may not be as reliable. 

Using ccache (with CC="ccache gcc" or the default installation on
Fedora, which puts it in the path) is what I do to keep the compile
delay under control.

> - Is there a way to reduce the startup time waf needs
>   befor it (apparently) does anything?
> 
> It would be great if the poeple most knowledgeable about waf
> could comment on the above. These are really things that make
> development with autoconf faster. Let's not forget that on the
> other side we have much advanced dependency tracking in waf that
> greatly reduces the need to do make clean or git clean.

This dependency calculation is essentially where the time goes.  A great
deal of caching is done to keep this as short as possible, but the
calculations must be done to ensure a correct build, every time. 

waf will never be as simple, nor as fast as a system without full
dependency tracking, but a lot of effort was put in to make it as fast
as it can be, within the constraint of always building correctly.  

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list