summaryrefslogtreecommitdiff
path: root/source4/dynconfig/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dynconfig/wscript')
-rw-r--r--source4/dynconfig/wscript17
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/dynconfig/wscript b/source4/dynconfig/wscript
index d975698ddf..375d4a14ea 100644
--- a/source4/dynconfig/wscript
+++ b/source4/dynconfig/wscript
@@ -17,6 +17,7 @@ dir_options = {
dyn_cflags = {
'BINDIR' : '${BINDIR}',
'SBINDIR' : '${SBINDIR}',
+ 'SCRIPTSBINDIR' : '${SBINDIR}',
'CONFIGDIR' : '${SYSCONFDIR}',
'CONFIGFILE' : '${SYSCONFDIR}/smb.conf',
'LMHOSTSFILE' : '${SYSCONFDIR}/lmhosts',
@@ -47,6 +48,7 @@ dyn_cflags = {
dyn_cflags_fhs = {
'BINDIR' : '${BINDIR}',
'SBINDIR' : '${SBINDIR}',
+ 'SCRIPTSBINDIR' : '${SBINDIR}',
'CONFIGDIR' : '${SYSCONFDIR}/samba',
'CONFIGFILE' : '${SYSCONFDIR}/samba/smb.conf',
'LMHOSTSFILE' : '${SYSCONFDIR}/samba/lmhosts',
@@ -119,15 +121,18 @@ def configure(conf):
def dynconfig_cflags(bld, list=None):
'''work out the extra CFLAGS for dynconfig.c'''
cflags = []
+ # override some paths when running from the build directory
+ override = { 'MODULESDIR' : 'bin/modules',
+ 'SCRIPTSBINDIR' : 'scripting/bin',
+ 'SETUPDIR' : 'setup' }
for f in dyn_cflags.keys():
if list and not f in list:
continue
- 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]))
+ value = bld.env[f]
+ if not Options.is_install:
+ if f in override:
+ value = os.path.join(os.getcwd(), override[f])
+ cflags.append('-D%s="%s"' % (f, value))
return cflags
Build.BuildContext.dynconfig_cflags = dynconfig_cflags