s4-waf: use cflags for LDB_MODULESDIR
authorAndrew Tridgell <tridge@samba.org>
Wed, 31 Mar 2010 07:05:29 +0000 (18:05 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:21 +0000 (20:27 +1000)
this prevents rebuilds when it changes

source4/lib/ldb/wscript

index 18a9f4c271510f3e7321b2fb6142b5ca5ce8311f..de70fa454ae472d213587a66a99064b8f67f7191 100644 (file)
@@ -9,6 +9,7 @@ import sys
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
 import wafsamba
 
+
 LIBTDB_DIR= srcdir + '/lib/tdb'
 LIBTEVENT_DIR= srcdir + '/lib/tevent'
 LIBPOPT_DIR= srcdir + '/lib/popt'
@@ -141,12 +142,14 @@ def build(bld):
         ldb_deps += ' LDBSAMBA POPT_CREDENTIALS POPT_SAMBA LIBCMDLINE_CREDENTIALS gensec'
 
     if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
+        modules_dir = bld.EXPAND_VARIABLES('${LDB_MODULESDIR}')
         bld.SAMBA_LIBRARY('ldb',
                           COMMON_SRC + ' ' + LDB_MAP_SRC,
                           deps=ldb_deps,
                           includes='include',
                           public_headers='include/ldb.h include/ldb_errors.h',
                           pc_files='ldb.pc',
+                          cflags='-DLDB_MODULESDIR=\"%s\"' % modules_dir,
                           vnum=VERSION)
 
     bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE',