7 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
8 import wafsamba, Options
11 opt.recurse('../lib/replace')
12 opt.recurse('dynconfig')
13 opt.recurse('scripting/python')
14 opt.recurse('lib/ldb')
15 opt.recurse('selftest')
16 opt.recurse('lib/tls')
17 opt.recurse('../lib/nss_wrapper')
18 opt.recurse('../lib/socket_wrapper')
19 opt.recurse('../lib/uid_wrapper')
20 opt.recurse('../lib/popt')
21 opt.recurse('../pidl')
24 conf.DEFINE('PACKAGE_NAME', 'samba', quote=True)
25 conf.DEFINE('PACKAGE_STRING', 'samba 4', quote=True)
26 conf.DEFINE('PACKAGE_TARNAME', 'samba', quote=True)
27 conf.DEFINE('PACKAGE_URL', "http://www.samba.org/", quote=True)
28 conf.DEFINE('PACKAGE_VERSION', "4", quote=True)
29 conf.DEFINE('PACKAGE_BUGREPORT', 'http://bugzilla.samba.org/', quote=True)
31 conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
32 conf.DEFINE('_SAMBA_BUILD_', 4, add_to_cflags=True)
33 conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
35 conf.BUNDLED_LIBRARY_EXTENSION('s4')
37 if Options.options.developer:
38 conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
40 # set a lower limit on recursing in waf preprocessor
41 conf.env.preprocessor_recursion_limit = 10
43 conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include #lib/replace #lib/talloc #lib/tevent')
45 conf.sub_config('../lib/replace')
47 conf.find_program('python', var='PYTHON', mandatory=True)
48 conf.find_program('perl', var='PERL', mandatory=True)
50 # enable tool to build python extensions
51 conf.check_tool('python')
52 conf.check_python_version((2,4,2))
53 conf.check_python_headers()
55 conf.sub_config('dynconfig')
56 conf.sub_config('scripting/python')
57 conf.sub_config('lib/ldb')
58 conf.sub_config('heimdal_build')
59 conf.sub_config('lib/tls')
60 conf.sub_config('ntvfs/sysdep')
61 conf.sub_config('../lib/util')
62 conf.sub_config('../lib/zlib')
63 conf.sub_config('../lib/util/charset')
64 conf.sub_config('auth')
65 conf.sub_config('../lib/nss_wrapper')
66 conf.sub_config('../nsswitch')
67 conf.sub_config('../lib/socket_wrapper')
68 conf.sub_config('../lib/uid_wrapper')
69 conf.sub_config('../lib/popt')
70 conf.sub_config('lib/smbreadline')
71 conf.sub_config('../pidl')
73 conf.SAMBA_CONFIG_H('include/config.h')
77 '''build TAGS file using etags'''
79 source_root = os.path.dirname(Utils.g_module.root_path)
80 cmd = 'etags $(find %s/.. -name "*.[ch]")' % source_root
81 print "Running: %s" % cmd
85 "build 'tags' file using ctags"
87 source_root = os.path.dirname(Utils.g_module.root_path)
88 cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
89 print "Running: %s" % cmd
92 # putting this here enabled build in the list
93 # of commands in --help
95 '''build all targets'''