make samba3 make -j proof

Jelmer Vernooij jelmer at
Wed Oct 11 08:35:11 GMT 2006

On Wed, Oct 11, 2006 at 10:22:07AM +0200, Bj?rn JACKE wrote:
> On 2006-10-10 at 20:24 +0000 Jelmer Vernooij sent off:
> >On Tue, 2006-10-10 at 21:30 +0200, Bj?rn JACKE wrote:
> >>sitting in a train today waiting for a samba compile I thought it 
> >>might be quite a bit faster if it would be compilable parallelized. I 
> >>saw that the changes neccessary in the Makefile to make this work are 
> >>not very big. See attached patch. I tested the Makefile with make -j20 
> >>without a problem. On a dual core machine the build is in fact twice 
> >>as fast now with make -j2.

> >>I needed to replace the suffix rule in the makefile with a implicit 
> >>pattern rule to be able to add dependencies to each resulting target. 
> >>VERY ancient make versions might not cope with that but all machines 
> >>that can cope with samba4's makefiles can cope with this, too. So I 
> >>thing there's nothing to worry about.
> >Using '%' is going to break on /a lot/ of platforms. We don't use it in
> >Samba4 - I think it only works with GNU make.
> the following is from Samba4; I strongly guess that make implementations 
> which
> cope with

> DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
>                   include/includes.d

> will also work with my patch. We might want to check this in to see how it
> works - we can revert it anyway if it doesn't.
That code is only included if we detect in configure that we are
running with GNU Make.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url :

More information about the samba-technical mailing list