s4-waf: added --enable-s3build configure option
authorAndrew Tridgell <tridge@samba.org>
Mon, 21 Feb 2011 04:50:51 +0000 (15:50 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 22 Feb 2011 01:51:10 +0000 (02:51 +0100)
this enables the build of the s3 binaries in the toplevel build

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/librpc/wscript_build
wscript
wscript_build

index cbe382e0de8f26151dbab6f682a4f0c729af2401..4e7543477a46542a22489f2f28d792fb3c4dfd70 100755 (executable)
@@ -92,6 +92,11 @@ bld.SAMBA_LIBRARY('dcerpc-samba4',
 
 bld.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c')
 
+if bld.env.enable_s3build:
+    s3_ndr = "NDR_WBINT"
+else:
+    s3_ndr = ""
+
 bld.SAMBA_SUBSYSTEM('ndr-table',
        source='../../librpc/ndr/ndr_table.c gen_ndr/tables.c',
         public_deps='''ndr-standard NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS
@@ -104,7 +109,7 @@ bld.SAMBA_SUBSYSTEM('ndr-table',
         NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI
         NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI
         NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP
-        NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY NDR_PREG NDR_WBINT''',
+        NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY NDR_PREG ''' + s3_ndr,
         depends_on='GEN_NDR_TABLES'
         )
 
diff --git a/wscript b/wscript
index 56b75d9c9f2bfc44ec2f5b94570addbb1bcf4f34..a31939e6bb37989e068e4bbce7c8b561e1ef99b0 100644 (file)
--- a/wscript
+++ b/wscript
@@ -48,6 +48,10 @@ def set_options(opt):
                    help='enable special build farm options',
                    action='store_true', dest='BUILD_FARM')
 
+    gr.add_option('--enable-s3build',
+                   help='enable build of s3 binaries',
+                   action='store_true', dest='S3BUILD')
+
     opt.tool_options('python') # options for disabling pyc or pyo compilation
     # enable options related to building python extensions
 
@@ -63,6 +67,9 @@ def configure(conf):
     if Options.options.developer:
         conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
 
+    if Options.options.S3BUILD:
+        conf.env.enable_s3build = True
+
     # this enables smbtorture.static for s3 in the build farm
     conf.env.BUILD_FARM = Options.options.BUILD_FARM or os.environ.get('RUN_FROM_BUILD_FARM')
 
@@ -107,7 +114,8 @@ def configure(conf):
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('pidl')
     conf.RECURSE('source4/selftest')
-    conf.RECURSE('source3')
+    if conf.env.enable_s3build:
+        conf.RECURSE('source3')
 
     # we don't want any libraries or modules to rely on runtime
     # resolution of symbols
index 37abfd1b77cf1ca05e32f330b1b6d3d6278a3aec..dd905f8063a20cd5ec50b7d64bcf7cfe1cbd5d4a 100644 (file)
@@ -105,7 +105,8 @@ bld.RECURSE('source4/setup')
 bld.RECURSE('source4/scripting')
 bld.RECURSE('pidl')
 bld.RECURSE('lib')
-bld.RECURSE('source3')
+if bld.env.enable_s3build:
+    bld.RECURSE('source3')
 
 # install some extra empty directories
 bld.INSTALL_DIRS("", "${LOCKDIR} ${SYSCONFDIR} ${LOCKDIR} ${PIDDIR} ${LOCALSTATEDIR}/lib ${PRIVATEDIR}/smbd.tmp/messaging")