1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

961 Commits

Author SHA1 Message Date
Michael Adam
a6ee401949 build: avoid -Wtautological-compare errors from gcc6+ by disabling it globally
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 15 04:31:27 CEST 2016 on sn-devel-144
2016-07-15 04:31:27 +02:00
Douglas Bagnall
1c796547f2 configure: set HAVE___ATTRIBUTE__ for heimdal
Without this, heimdal ends up defining __attribute__ away, causing
gcc-6 compile errors with -Werror=return-type because it can't tell
when functions have __attribute__((noreturn)).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar  9 13:52:26 CET 2016 on sn-devel-144
2016-03-09 13:52:26 +01:00
Jelmer Vernooij
3eb90650a8 Error when private libraries have public headers.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
48ebeaa4aa Add private_headers flag to SAMBA_*() functions.
While this argument is correctly ignored, it does mean that we can
associate private headers with specific subsystems/libraries.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
2016-01-13 04:43:22 +01:00
Andrew Bartlett
78e9f1effb build: Add space before -D option
This ensures that it is not concatonated with the previous option

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jan  8 02:36:47 CET 2016 on sn-devel-144
2016-01-08 02:36:47 +01:00
Andrew Bartlett
46b8d7fc52 python: Assert that we use Py_ssize_t consistently for PyParseArgs*()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2016-01-07 23:33:10 +01:00
Thomas Nagy
d60465cfec build:wafsamba: Use the upstream version of gccdeps
This removes the duplicate gccdeps file provided in the Samba tree.
The two files buildtools/wafsamba/gccdeps.py and thirdparty/wafadmin/3rdparty/gccdeps.py
are identical except for the whitespaces (compare them with `diff -burN`)

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Sat Jan  2 22:31:56 CET 2016 on sn-devel-144
2016-01-02 22:31:56 +01:00
Thomas Nagy
3b2ae078a5 build:wafsamba: Ensure that check_group_ordering can be overridden
Group ordering verifications are performed by default in Waf 1.8,
so this method will be redundant. The purpose of this change is
to make it easier to disable check_group_ordering as it contains
code that is very specific to Waf 1.5.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 24 08:03:29 CET 2015 on sn-devel-104
2015-11-24 08:03:29 +01:00
Thomas Nagy
735cf0683d build:wafsamba: Ensure that target clones get a different name
Changing the 'target' attribute results in a different file name,
which is visibly necessary. Yet the 'name' attribute should also
be modified even if invisible as it is used to query targets
(uselib for example). Failing to do so results in errors in Waf 1.8.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-11-24 05:00:27 +01:00
Thomas Nagy
cc4f7e3933 build:wafsamba: Specify whether node objects or flat lists in ant_glob
The changes enable the ant_glob declaration to be compatible with
more recent versions of Waf.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-11-24 05:00:27 +01:00
Thomas Nagy
5036c6e744 build:wafsamba: remove check_orphaned_targets
The function check_orphaned_targets is not used and has
no specification, so it can be removed safely.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov 19 13:10:53 CET 2015 on sn-devel-104
2015-11-19 13:10:53 +01:00
Thomas Nagy
db99742d8b build:wafsamba: Waf 1.8 compatible declaration of 'mandatory' configuration tests
The configuration tests raise exceptions by default in later Waf versions,
but the samba tests do not specify whether the errors should be raised or
not. This changes lifts the ambiguity.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 16 14:50:39 CET 2015 on sn-devel-104
2015-11-16 14:50:38 +01:00
Thomas Nagy
cfe8becb9e build:wafsamba: Replace Options.is_install by bld.is_install
Options.is_install is a deprecated module variable that is more
verbose than bld.is_install and complicates the Waf 1.8 upgrade.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-11-16 11:48:14 +01:00
Thomas Nagy
f3033a1943 build:wafsamba: Remove the print_commands code from the build scripts
Using the print_commands tool makes it easier to upgrade to Waf 1.8.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-11-06 10:37:24 +01:00
Thomas Nagy
963ccff806 build:wafsamba: Remove samba_utils.runonce
The decorator order matters in the following:
"""
@runonce
@conf
function()
"""

First, the @conf decorator binds the function to the configuration context
and then returns the same function. The @runonce decorator then takes
the output function and replaces it by another that performs caching. This new
function remains in the current script and is never bound to the configuration
context, so caching never occurs.

The declaration would have been correct if written like this:
"""
@conf
@runonce
function()
"""

Yet the decorator @run_once does not keep the function name (__name__), so the
annotation with @conf would fail. The straightforward approach is to remove
all the incorrect @runonce occurrences.

Besides that, the function Utils.run_once is already present in the Waf library,
and is sufficient for the current needs of the Samba code (it caches only the
first argument). Therefore samba_utils.runonce can be safely replaced by
Utils.run_once, which is also present in Waf 1.8.

Note: at runtime, only SETUP_BUILD_GROUPS seems to actually use caching.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-11-06 10:37:24 +01:00
Thomas Nagy
9731979098 build:wafsamba: Moved samba_before_apply_obj_vars to samba_utils
The function samba_before_apply_obj_vars serves to remove system paths,
it is certainly not an optimisation and has no place in that module.
By optimisation, we mean that the build process could run without it.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-11-06 10:37:24 +01:00
Thomas Nagy
40a2deb520 build:wafsamba: Removed unnecessary and misleading variables
There is no 'allow_duplicates' attribute anywhere.
The function 'check_duplicate_sources' always returns True unless it raises an exception
There is no list of source files to use
The variable 'tstart' is unused

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni uri@samba.org
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-11-06 10:37:24 +01:00
Petr Viktorin
c54fc3f2b6 ldb: Run the Python testsuite
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-11-05 18:04:23 +01:00
Stefan Metzmacher
b06544da6f wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM()
All prerequisite libraries of CHECK_BUNDLED_SYSTEM[_PKG](onlyif='lib1 lib2')
need to be checked before.

That means conf.env['FOUND_SYSTEMLIB_lib1'] and conf.env['FOUND_SYSTEMLIB_lib2']
need to exist independed of its value (True or False). Otherwise this is a logic error.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov  4 18:38:18 CET 2015 on sn-devel-104
2015-11-04 18:38:18 +01:00
Thomas Nagy
861018f143 build:wafsamba: Remove the now unneeded special treatment of rpath flags
The flags parsing fixes were backported to waf 1.5 from waf 1.8. There is no reason
to keep the flags parsing fixes in Samba.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov  2 03:35:31 CET 2015 on sn-devel-104
2015-11-02 03:35:31 +01:00
Petr Viktorin
9ef47d2531 buildtools: Ignore exact Python version for ABI checking
Utilities for Python libraries are built for a specific Python
version. Starting with Python 3, the Python version is recorded
in the shared library filename as an ABI tag, e.g. "pytalloc.cpython-34m.so.
The exact version doesn't matter for Samba's ABI check.
Replace the ABI tag with a simpler one that just records the major
version of Python.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Nov  1 01:09:06 CET 2015 on sn-devel-104
2015-11-01 01:09:06 +01:00
Thomas Nagy
1466e27fa6 build:wafsamba: Removed hard-coded class names from build scripts
Using hard-coded class names prevents subclassing and make it hard
to reason about the workflow. The wscript files read during the build
must be read during the installation phase as well.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-10-28 21:40:24 +01:00
Thomas Nagy
2666d06f29 build:wafsamba: removed most import * statements
The 'import *' statements make it more difficult to reason about
the modules and tends to conceal bugs. These changes enable running
pyflakes against most of the build scripts.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 28 12:52:17 CET 2015 on sn-devel-104
2015-10-28 12:52:17 +01:00
Martin Schwenke
cbae31c794 build: --picky-developer implies --enable-developer
Have --picky-developer enable --enable-developer too, instead of
requiring both options to be specified.  This makes it obey the
principle of least surprise.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Oct 27 07:19:33 CET 2015 on sn-devel-104
2015-10-27 07:19:33 +01:00
Thomas Nagy
84b7a9f939 build:wafsamba: dead code removal in gettext detection
Since the --gettext-location command-line option has no effect, the misleading
code is removed. The samba functions ADD_CFLAGS must also be used in the future

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 27 03:34:28 CET 2015 on sn-devel-104
2015-10-27 03:34:28 +01:00
Thomas Nagy
96108058d0 build:wafsamba: Enable feature-compatible declaration for Waf 1.8
In Waf 1.8 the declaration is features='c', not features='cc'. These changes
prepare the replacement of Waf 1.5 by Waf 1.8 for Samba.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-10-13 06:34:16 +02:00
Andrew Bartlett
1dc05386f2 build: Move __attribute__ ((destructor)) and ((constructor)) tests to wafsamba
This allows us to use them in talloc as well.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-10-09 20:14:06 +02:00
Gustavo Zacarias
1399198d51 build: improve stack protector check
Testing a toolchain for proper -fstack-protector must go beyond ensuring
the compiler and linker accept the option.
If the test C program does nothing with the stack then guards aren't
inserted and/or are optimized away giving the false impression that it
works when in fact the libc might not support it.

Update the check to a program that uses the stack, hence making a link
fail if proper support isn't available, for example in non-ssp enabled
uclibc toolchains like this:

test.c:(.text.startup+0x64): undefined reference to `__stack_chk_fail'

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Sep 21 23:29:13 CEST 2015 on sn-devel-104
2015-09-21 23:29:13 +02:00
Thomas Nagy
ba6c7df7f9 build:wafsamba: Use the Waf 1.8 API get_tgen_by_name instead of name_to_obj
Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  2 03:49:51 CEST 2015 on sn-devel-104
2015-09-02 03:49:51 +02:00
Thomas Nagy
ffea9a17d7 build:wafsamba: Close file handles in the build scripts too
Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-09-02 00:47:18 +02:00
Stefan Metzmacher
9d9a767ef2 wafsamba: don't add -DSTATIC_%s_MODULES* arguments for SAMBA_LIBRARY(pyembed=True)
Python helper libraries don't have any modules and having something like
'.cpython-34m' in the name, e.g. STATIC_pytalloc-util.cpython-34m_MODULES
breaks the build.

Another way to fix this would be removing PYTHON_SO_ABI_FLAG from the name.

This allows --extra-python=/usr/bin/python3 to work on Ubuntu 14.04.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-08-06 00:43:24 +02:00
Petr Viktorin
5090d491af buildtools: Fix crash on invalid --extra-python option
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-21 19:04:15 +02:00
Petr Viktorin
5a4e5d7cbf buildtools: Don't configure Python more than once
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-21 19:04:14 +02:00
Amitay Isaacs
4974322119 wafsamba: Cache final_libs for each target
The code for saving/loading dependencies does not cache final_libs for
each target.  If wafsamba tries to reuse the saved dependencies, then
it does not get the dependencies on the private libraries correctly.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jun 30 09:44:10 CEST 2015 on sn-devel-104
2015-06-30 09:44:10 +02:00
Thomas Nagy
26a7372e3b Always use Samba's CHECK_CFG instead of waf check_cfg 2015-06-26 02:10:12 +02:00
Thomas Nagy
21f98e58da Remove PYTHONDIR and PYTHONARCHDIR in a single place 2015-06-26 02:10:12 +02:00
Andreas Schneider
893b5f8144 wafsamba: Also build libraries with RELRO protection
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11346

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 19 12:51:48 CEST 2015 on sn-devel-104
2015-06-19 12:51:48 +02:00
Stefan Metzmacher
ff072a6336 wafsamba: let CHECK_DECLS() find enum values
In the current state this still generates the same config.h
at least on ubuntu 14.04 amd64.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:20 +02:00
Stefan Metzmacher
86671dbd9f wafsamba: remove unused allow_warnings=True from SAMBA_PYTHON()
This is not needed anymore all python bindings build without wawrnings now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:20 +02:00
Petr Viktorin
2bf1443bd0 buildtools: Always reset the build environment
In install_library, the Build object's environment was not reset
after an early return, so the extrapython env would be used in
subsequent build steps.
Wrap everything in a try-finally block to make sure the env is reset.

(Almost all of the change is indentation, `git show -w` recommended.)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-06-10 06:06:18 +02:00
Uri Simchoni
1c58fee706 waf: add a sample run-on-target script
This is a sample script that can be used with the --cross-execute
configure switch to run configure tests on a remote target for which
samba is being cross-compiled.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
25b1721075 waf: Fix parsing of cross-answers file in case answer includes a colon
The answer provided in the cross-answers file may include a colon,
as in:
Checking uname version type: "#57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014"

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
56114bb677 waf: allow cross-execute program to have arguments with spaces
When cross-compiling samba using the cross-execute method,
allow the cross-excute command to have arguments that contain
spaces by quoting them.

For example:

./configure --cross-compile '--cross-execute=ce-program "par am"'

In this case, for each cross test whose binary is /path/testprog,
waf shall run the equivalent of running from a shell:
ce-program "par am" /path/testprog

This is useful for passing an arbitrary argument list to a subprocess
of the cross-execute program, such as in buildtools/examples/run_on_target.py

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
c244e7dc09 waf: improve readability of cross-answers generated by cross-execute
When generating a result for cross-answers from the (retcode, retstring) tuple:
- (0, "output") indicated as "output"
- 1 is interpreted as generic fail code, instead of 255, because most
  if not all tests fail with 1 as exit code rather than 255
- For failing test, use NO instead of FAIL, because that's not
  necessarily a failure (it could mean that something is NOT
  broken)

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
eb696df493 Adds a new mode to samba cross-compiling.
When both --cross-answers and --cross-execute are set, this means:
- Use cross-answers
- If answer is unknown, then instead of adding UNKNOWN to the cross-answers
  file and failing configure, the new mode runs cross-execute to determine the
  answer and adds that to the cross-answers file.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
3fb617310d waf: sanitize and fix added cross answer
When configuring samba for cross-compilation using the cross-answers
method, the function add_answer receives the standard output and exit code
of a configuration test and updates the cross-answers file accordingly.

This patch sanitizes the standard output to conform to the cross-answers
file format - one line of output. It also adds a missing newline.

(Note - at this point add_answer is only ever called with empty output
but this change is significant for the reminder of this patchset)

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Uri Simchoni
843c373d00 waf: always close cross answers file
When configuring samba for cross-compilation using the
cross-answers file, the file is not closed in a couple of
cases - fix that.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-20 11:19:11 +02:00
Jelmer Vernooij
0dcf535795 Factor out submodule presence checking.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 19 22:17:48 CEST 2015 on sn-devel-104
2015-05-19 22:17:47 +02:00
Jelmer Vernooij
5e0821201c Make waf fail if submodules are out of date.
Instead, suggest the user run 'git submodule update'.

This should prevent users from accidentally building Samba against
outdated or too new versions of the bundled third party libraries
after switching branches.

I've opted to make this an error rather than actually
running 'git submodule update' directly, as the latter could
cause unpredictable behaviour. If we find that manually updating
submodules is too cumbersome, we can always change this. The normal mode
of operation for developers should not involve any submodules at all,
but system versions of these libraries.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-19 19:28:19 +02:00
Jelmer Vernooij
5d672b9a53 Factor out function for finding Git binary.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-19 19:28:19 +02:00