summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-17 20:12:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:48 +1000
commit844acb226086e55de9a2442396a4e002471295e8 (patch)
treef84eef86a64b5f1c34f44999bea6b1913d47e864 /lib
parent845e0cbe6f43e2762796c644035ac6bc2b07cf17 (diff)
downloadsamba-844acb226086e55de9a2442396a4e002471295e8.tar.gz
samba-844acb226086e55de9a2442396a4e002471295e8.tar.bz2
samba-844acb226086e55de9a2442396a4e002471295e8.zip
build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started adding the waf test code
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wscript18
-rw-r--r--lib/subunit/python/wscript_build16
2 files changed, 29 insertions, 5 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e3f7075897..ab7ef9783d 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -28,7 +28,7 @@ def set_options(opt):
action="store_true", dest='developer', default=False)
opt.add_option('--timestamp-dependencies',
help=("use file timestamps instead of content for build dependencies (BROKEN)"),
- action="store", dest='timestamp_dependencies', default=False)
+ action="store_true", dest='timestamp_dependencies', default=False)
@wafsamba.runonce
def configure(conf):
@@ -43,7 +43,7 @@ def configure(conf):
conf.check_tool('compiler_cc')
# gccdeps can be useful for debugging recursion in #include lines
- # conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba")
+ conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba")
# make the install paths available in environment
conf.env.LIBDIR = Options.options.LIBDIR
@@ -52,6 +52,9 @@ def configure(conf):
conf.env.RPATH_ON_INSTALL = Options.options.enable_rpath
+ # we should use the PIC options in waf instead
+ conf.ADD_CFLAGS('-fPIC')
+
# check for pkgconfig
conf.check_cfg(atleast_pkgconfig_version='0.0.0')
@@ -163,6 +166,7 @@ def configure(conf):
conf.CHECK_FUNCS_IN('poptGetContext', 'popt')
conf.CHECK_FUNCS_IN('res_search', 'resolv')
conf.CHECK_FUNCS_IN('gettext', 'intl')
+ conf.CHECK_FUNCS_IN('pthread_create', 'pthread')
conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True)
@@ -269,8 +273,6 @@ def configure(conf):
cflags=conf.env.VISIBILITY_CFLAGS,
define='HAVE_VISIBILITY_ATTR')
- # use this later -> conf.recurse('.', name='getpass')
-
if conf.CHECK_FUNCS('getpass getpassphrase'):
# if we have both, then we prefer getpassphrase
conf.DEFINE(REPLACE_GETPASS_BY_GETPASSPHRASE, 1)
@@ -294,7 +296,8 @@ def build(bld):
bld.SAMBA_LIBRARY('replace',
source=REPLACE_SOURCE,
- group='base_libraries')
+ group='base_libraries',
+ deps='LIBREPLACE_GETPASS')
TEST_SOURCES = '''test/testsuite.c test/main.c test/strptime.c
test/os2_delete.c test/getifaddrs.c'''
@@ -317,3 +320,8 @@ def build(bld):
if not 'HAVE_CRYPT' in bld.env: CRYPT_SOURCES.append('crypt.c')
bld.SAMBA_SUBSYSTEM('LIBREPLACE_EXT', CRYPT_SOURCES)
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c',
+ enabled=bld.CONFIG_SET('REPLACE_GETPASS'))
+
+ bld.CHECK_PROJECT_RULES()
diff --git a/lib/subunit/python/wscript_build b/lib/subunit/python/wscript_build
new file mode 100644
index 0000000000..f690ae30d5
--- /dev/null
+++ b/lib/subunit/python/wscript_build
@@ -0,0 +1,16 @@
+
+# install out various python scripts for use by make test
+
+bld.SAMBA_SCRIPT('python_iso8601',
+ pattern='iso8601/**/*.py',
+ installdir='python')
+
+
+bld.SAMBA_SCRIPT('python_subunit',
+ pattern='subunit/**/*.py',
+ installdir='python')
+
+
+bld.SAMBA_SCRIPT('python_testtools',
+ pattern='testtools/**/*.py',
+ installdir='python')