summaryrefslogtreecommitdiff
path: root/source4/dynconfig/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-13 10:37:22 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-13 11:00:04 +0000
commit72de3e698b651da08a542864bb94b4e1b35dd935 (patch)
treed76264a3f900d24ab0bd8103e10d6212a55da8e4 /source4/dynconfig/wscript
parentd95160ca2f22edbc000ea2c78eab04e8e06be151 (diff)
downloadsamba-72de3e698b651da08a542864bb94b4e1b35dd935.tar.gz
samba-72de3e698b651da08a542864bb94b4e1b35dd935.tar.bz2
samba-72de3e698b651da08a542864bb94b4e1b35dd935.zip
s4-dynconfig: use the build modules when running from build directory
we need to use the newly built modules when running from the build directory to ensure we don't run tests against a stale install Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/dynconfig/wscript')
-rw-r--r--source4/dynconfig/wscript10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/dynconfig/wscript b/source4/dynconfig/wscript
index 722940f28e..e614624d70 100644
--- a/source4/dynconfig/wscript
+++ b/source4/dynconfig/wscript
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import string, Utils, Options, sys, Build
+import string, Utils, Options, sys, Build, os
from samba_utils import EXPAND_VARIABLES
# list of directory options to offer in configure
@@ -120,7 +120,12 @@ def dynconfig_cflags(bld):
'''work out the extra CFLAGS for dynconfig.c'''
cflags = []
for f in dyn_cflags.keys():
- cflags.append('-D%s="%s"' % (f, bld.env[f]))
+ if not Options.is_install and f == 'MODULESDIR':
+ # we want binaries run from the source dir to use the current
+ # modules, not the installed ones
+ cflags.append('-DMODULESDIR="%s"' % os.path.join(os.getcwd(), 'bin/modules'))
+ else:
+ cflags.append('-D%s="%s"' % (f, bld.env[f]))
return cflags
Build.BuildContext.dynconfig_cflags = dynconfig_cflags
@@ -132,4 +137,3 @@ def build(bld):
public_headers='../version.h',
header_path='samba',
cflags=cflags)
-