[PATCH] Add some plumbing in our top level Makefile to make life easier

Michael Adam obnox at samba.org
Fri Sep 26 01:23:36 MDT 2014


Reviewed-by me
(with added comment on .NOTPARALLEL) as discussed in person.

Cheers - Michael

On 2014-09-25 at 23:48 -0700, Matthieu Patou wrote:
> Hello All,
> 
> Can some one review this patch ?
> 
> Should make life more easier if you want to rebuild just one thing.
> 
> 
> Mattthieu

> >From 821afabc5e0a31b8a4c3878506b50dc498f14832 Mon Sep 17 00:00:00 2001
> From: Matthieu Patou <mat at matws.net>
> Date: Thu, 25 Sep 2014 23:32:50 -0700
> Subject: [PATCH] Add some plumbing in our top level Makefile to make life
>  easier
> 
> For instance you can type make bin/smbd to build just smbd (and it's
> dependencies still) or make bin/smbd bin/smbtorture
> 
> You can also do make service_drepl if you want just to build the stuff
> related to DRS
> 
> Change-Id: I61bdaeff79ecfb1a15728c2de7e6a6a14dd8bc7d
> Signed-off-by: Matthieu Patou <mat at matws.net>
> ---
>  Makefile | 36 +++++++++++++++++++++++++++++++-----
>  1 file changed, 31 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a53c27a..182eec5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -70,13 +70,39 @@ etags:
>  ctags:
>  	$(WAF) ctags
>  
> -# this allows for things like "make bin/smbtorture"
> -bin/%:: FORCE
> -	$(WAF) --targets=$@
> -FORCE:
> -
>  pydoctor:
>  	$(WAF) pydoctor
>  
>  pep8:
>  	$(WAF) pep8
> +
> +# Adding force on the depencies will force the target to be always rebuild form the Make
> +# point of view forcing make to invoke waf
> +
> +bin/smbd: FORCE
> +	$(WAF) --targets=smbd/smbd
> +
> +bin/winbindd: FORCE
> +	$(WAF) --targets=winbindd/winbindd
> +
> +bin/nmbd: FORCE
> +	$(WAF) --targets=nmbd/nmbd
> +
> +bin/smbclient: FORCE
> +	$(WAF) --targets=client/smbclient
> +
> +# this allows for things like "make bin/smbtorture"
> +# mainly for the binary that don't have a broken mode like smbd that must
> +# be build with smbd/smbd
> +bin/%: FORCE
> +	$(WAF) --targets=$(subst bin/,,$@)
> +
> +# Catch all rule to be able to call make service_repl in order to find the name
> +# of the submodule you want to build, look at the wscript
> +%:
> +	$(WAF) --targets=$@
> +
> +# This rule has to be the last one
> +FORCE:
> +.NOTPARALLEL: %
> +.PHONY: FORCE
> -- 
> 1.9.1
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140926/0e72fadb/attachment.pgp>


More information about the samba-technical mailing list