[PATCH] build scripts enhancements

Michael Adam obnox at samba.org
Fri Jun 19 16:19:59 MDT 2015


Thanks Thomas,

On 2015-06-19 at 18:36 +0200, Thomas Nagy wrote:
> Please apply the patches attached to this message

Reviewed-by: me

We need a second team reviewer.

> and update your Waf 1.5 copy from the source repository https://github.com/waf-project/waf.waf15

Jelmer: can you do that?

Cheers - Michael

> From 548205c241b3082c6ac9fac7105fd46f04b27027 Mon Sep 17 00:00:00 2001
> From: Thomas Nagy <tnagy2pow10 at gmail.com>
> Date: Thu, 18 Jun 2015 23:45:11 +0200
> Subject: [PATCH 1/2] Remove PYTHONDIR and PYTHONARCHDIR in a single place
> 
> ---
>  buildtools/wafsamba/samba_python.py | 4 ++++
>  ctdb/wscript                        | 3 ---
>  wscript                             | 5 -----
>  3 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
> index fb378ae..7546bbd 100644
> --- a/buildtools/wafsamba/samba_python.py
> +++ b/buildtools/wafsamba/samba_python.py
> @@ -55,6 +55,10 @@ def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True):
>      else:
>          conf.msg("python headers", "using cache")
>  
> +    # we don't want PYTHONDIR in config.h, as otherwise changing
> +    # --prefix causes a complete rebuild
> +    del(conf.env.defines['PYTHONDIR'])
> +    del(conf.env.defines['PYTHONARCHDIR'])
>  
>  def _check_python_headers(conf, mandatory):
>      conf.check_python_headers(mandatory=mandatory)
> diff --git a/ctdb/wscript b/ctdb/wscript
> index b5c6087..9561750 100755
> --- a/ctdb/wscript
> +++ b/ctdb/wscript
> @@ -212,9 +212,6 @@ def configure(conf):
>              conf.ADD_EXTRA_INCLUDES('#ctdb')
>          conf.ADD_EXTRA_INCLUDES('#lib #lib/replace')
>  
> -        del(conf.env.defines['PYTHONDIR'])
> -        del(conf.env.defines['PYTHONARCHDIR'])
> -
>          conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
>          conf.DEFINE('SAMBA_UTIL_CORE_ONLY', 1, add_to_cflags=True)
>          conf.SAMBA_CONFIG_H()
> diff --git a/wscript b/wscript
> index 7700c32..a84e5d5 100644
> --- a/wscript
> +++ b/wscript
> @@ -172,11 +172,6 @@ def configure(conf):
>      if not conf.CHECK_NEED_LC("-lc not needed"):
>          conf.ADD_LDFLAGS('-lc', testflags=False)
>  
> -    # we don't want PYTHONDIR in config.h, as otherwise changing
> -    # --prefix causes a complete rebuild
> -    del(conf.env.defines['PYTHONDIR'])
> -    del(conf.env.defines['PYTHONARCHDIR'])
> -
>      if not conf.CHECK_CODE('#include "tests/summary.c"',
>                             define='SUMMARY_PASSES',
>                             addmain=False,
> -- 
> 2.1.0
> 

> From ed996da2e5f843eca776d71d88811fd9d64ea436 Mon Sep 17 00:00:00 2001
> From: Thomas Nagy <tnagy2pow10 at gmail.com>
> Date: Thu, 18 Jun 2015 23:46:04 +0200
> Subject: [PATCH 2/2] Always use Samba's CHECK_CFG instead of waf check_cfg
> 
> ---
>  buildtools/wafsamba/samba_bundled.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
> index 515590f..c8bfcd2 100644
> --- a/buildtools/wafsamba/samba_bundled.py
> +++ b/buildtools/wafsamba/samba_bundled.py
> @@ -190,7 +190,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
>          pkg = libname
>  
>      # try pkgconfig first
> -    if (conf.check_cfg(package=pkg,
> +    if (conf.CHECK_CFG(package=pkg,
>                        args='"%s >= %s" --cflags --libs' % (pkg, minversion),
>                        msg=msg, uselib_store=uselib_store) and
>          check_functions_headers_code()):
> -- 
> 2.1.0
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150620/22ac8ac6/attachment.pgp>


More information about the samba-technical mailing list