summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-07 00:05:27 +0100
committerGünther Deschner <gd@samba.org>2011-01-07 00:57:10 +0100
commitf405384ad840ebe438ecf3a2ce05893857c952b2 (patch)
tree46d4de50579436111e239a3a326effc438e344ae /source3
parenta7bdb491885f6afd54604d8a968c12b6015daa2d (diff)
downloadsamba-f405384ad840ebe438ecf3a2ce05893857c952b2.tar.gz
samba-f405384ad840ebe438ecf3a2ce05893857c952b2.tar.bz2
samba-f405384ad840ebe438ecf3a2ce05893857c952b2.zip
s3-waf: make the --with-Xdir options work more like in the classic build.
Also remove duplicates and sort the tables. Still not sure if I understand the reason of processing the flags table after the diroptions table, as every option you give it via configure was overwritten immediately. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Jan 7 00:57:10 CET 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/build/dynconfig.py49
-rw-r--r--source3/build/wscript4
2 files changed, 26 insertions, 27 deletions
diff --git a/source3/build/dynconfig.py b/source3/build/dynconfig.py
index 4bc97e5edd..f755f7fef5 100644
--- a/source3/build/dynconfig.py
+++ b/source3/build/dynconfig.py
@@ -2,51 +2,48 @@ import string, Utils
# list of directory options to offer in configure
dir_options = {
- 'with-piddir' : [ '${PREFIX}/var/locks', 'where to put pid files' ],
- 'with-privatedir' : [ '${PREFIX}/private', 'Where to put sam.ldb and other private files' ],
- 'with-winbindd-socket-dir' : [ '${PREFIX}/var/lib/winbindd', 'winbind socket directory' ],
- 'with-winbindd-privileged-socket-dir' : [ '${PREFIX}/var/lib/winbindd_privileged', 'winbind privileged socket directory'],
- 'with-ntp-signd-socket-dir' : [ '${PREFIX}/var/run/ntp_signd', 'NTP signed directory'],
- 'with-lockdir' : [ '${PREFIX}/var/locks', 'where to put lock files' ],
- 'with-codepagedir' : [ '${PREFIX}/lib/samba', 'where to put codepages' ],
- 'with-privatedir' : [ '${PREFIX}/private', 'where to put smbpasswd' ],
'with-cachedir' : [ '${PREFIX}/var/locks', 'where to put temporary cache files' ],
- 'with-logfilebase' : [ '${PREFIX}/var/log/samba', 'Where to put log files' ],
+ 'with-codepagedir' : [ '${PREFIX}/lib/samba', 'where to put codepages' ],
'with-configdir' : [ '${PREFIX}/etc/samba', 'Where to put configuration files' ],
- 'with-swatdir' : [ '${PREFIX}/swat', 'Where to put SWAT files' ],
- 'with-statedir' : [ '${PREFIX}/var/locks', 'where to put persistent state files' ],
- 'with-cachedir' : [ '${PREFIX}/var/locks', 'where to put temporary cache files' ],
+ 'with-lockdir' : [ '${PREFIX}/var/locks', 'where to put lock files' ],
+ 'with-logfilebase' : [ '${PREFIX}/var/log/samba', 'Where to put log files' ],
'with-ncalrpcdir' : [ '${PREFIX}/var/ncalrpc', 'where to put ncalrpc sockets' ],
+ 'with-ntp-signd-socket-dir' : [ '${PREFIX}/var/run/ntp_signd', 'NTP signed directory'],
'with-pammodulesdir' : [ '', 'Which directory to use for PAM modules' ],
- 'with-codepagedir' : [ '${PREFIX}/lib/samba', 'Where to put codepages' ],
+ 'with-piddir' : [ '${PREFIX}/var/locks', 'where to put pid files' ],
+ 'with-privatedir' : [ '${PREFIX}/private', 'where to put smbpasswd' ],
'with-selftest-prefix' : [ '', 'The prefix where make test will be run' ],
- 'with-selftest-shrdir' : [ '', 'The share directory that make test will be run against' ]
+ 'with-selftest-shrdir' : [ '', 'The share directory that make test will be run against' ],
+ 'with-statedir' : [ '${PREFIX}/var/locks', 'where to put persistent state files' ],
+ 'with-swatdir' : [ '${PREFIX}/swat', 'Where to put SWAT files' ],
+ 'with-winbindd-privileged-socket-dir' : [ '${PREFIX}/var/lib/winbindd_privileged', 'winbind privileged socket directory'],
+ 'with-winbindd-socket-dir' : [ '${PREFIX}/var/lib/winbindd', 'winbind socket directory' ],
}
# list of cflags to use for dynconfig.c
dyn_cflags = {
- 'CONFIGFILE' : '${SYSCONFDIR}/smb.conf',
'BINDIR' : '${BINDIR}',
- 'SBINDIR' : '${SBINDIR}',
+ 'CACHEDIR' : '${CACHEDIR}',
+ 'CODEPAGEDIR' : '${CODEPAGEDIR}',
+ 'CONFIGDIR' : '${SYSCONFDIR}',
+ 'CONFIGFILE' : '${SYSCONFDIR}/smb.conf',
+ 'DATADIR' : '${DATADIR}',
'LIBDIR' : '${LIBDIR}',
- 'STATEDIR' : '${LOCALSTATEDIR}',
'LMHOSTSFILE' : '${SYSCONFDIR}/lmhosts',
'LOCKDIR' : '${LOCALSTATEDIR}/locks',
- 'PIDDIR' : '${LOCALSTATEDIR}/run',
- 'DATADIR' : '${DATADIR}',
'LOGFILEBASE' : '${LOCALSTATEDIR}',
- 'CONFIGDIR' : '${SYSCONFDIR}',
+ 'MODULESDIR' : '${PREFIX}/modules',
'NCALRPCDIR' : '${LOCALSTATEDIR}/ncalrpc',
- 'SWATDIR' : '${PREFIX}/swat',
+ 'NTP_SIGND_SOCKET_DIR' : '${NTP_SIGND_SOCKET_DIR}',
+ 'PIDDIR' : '${LOCALSTATEDIR}/run',
'PRIVATE_DIR' : '${PRIVATEDIR}',
- 'MODULESDIR' : '${PREFIX}/modules',
+ 'SBINDIR' : '${SBINDIR}',
'SETUPDIR' : '${DATADIR}/setup',
+ 'SMB_PASSWD_FILE' : '${PRIVATEDIR}/smbpasswd',
+ 'STATEDIR' : '${LOCALSTATEDIR}',
+ 'SWATDIR' : '${PREFIX}/swat',
'WINBINDD_PRIVILEGED_SOCKET_DIR' : '${WINBINDD_PRIVILEGED_SOCKET_DIR}',
'WINBINDD_SOCKET_DIR' : '${WINBINDD_SOCKET_DIR}',
- 'NTP_SIGND_SOCKET_DIR' : '${NTP_SIGND_SOCKET_DIR}',
- 'CODEPAGEDIR' : '${CODEPAGEDIR}',
- 'CACHEDIR' : '${CACHEDIR}',
- 'SMB_PASSWD_FILE' : '${PRIVATEDIR}/smbpasswd',
}
def get_varname(v):
diff --git a/source3/build/wscript b/source3/build/wscript
index 3b0c66a9f4..c6eb55fc29 100644
--- a/source3/build/wscript
+++ b/source3/build/wscript
@@ -23,6 +23,7 @@ def configure(conf):
for option in dir_options.keys():
varname = get_varname(option)
value = getattr(Options.options, varname, None)
+ value = Utils.subst_vars(value, conf.env)
conf.ASSERT(value is not None, "Missing configure option %s" % varname)
conf.ASSERT(varname not in conf.env, "Variable %s already defined" % varname)
conf.env[varname] = value
@@ -33,7 +34,8 @@ def configure(conf):
v = Utils.subst_vars(v, conf.env)
conf.ASSERT(v != '', "Empty dynconfig value for %s" % f)
conf.ASSERT(v.find('${') == -1, "Unsubstituted variable in %s : %s : %s" % (f, dyn_cflags[f], v))
- conf.env[f] = v
+ if f not in conf.env:
+ conf.env[f] = v
if f in cflags_vars:
conf.DEFINE(f, v, quote=True)