libcli-security: Add documentation for object_tree_modify_access
[Samba/gbeck.git] / buildtools / bin / waf
blobdb6a7d3386a137602901b9a55560b469f76d5e35
1 #!/usr/bin/env python
2 # encoding: ISO-8859-1
3 # Thomas Nagy, 2005-2010
5 """
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
17 3. The name of the author may not be used to endorse or promote products
18 derived from this software without specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
21 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
24 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31 """
33 import os, sys
34 if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3")
36 if 'PSYCOWAF' in os.environ:
37 try:import psyco;psyco.full()
38 except:pass
40 VERSION="1.5.19"
41 REVISION="x"
42 INSTALL="x"
43 C1='x'
44 C2='x'
45 cwd = os.getcwd()
46 join = os.path.join
48 WAF='waf'
49 def b(x):
50 return x
52 if sys.hexversion>0x300000f:
53 WAF='waf3'
54 def b(x):
55 return x.encode()
57 def err(m):
58 print(('\033[91mError: %s\033[0m' % m))
59 sys.exit(1)
61 def test(dir):
62 try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir)
63 except OSError: pass
65 def find_lib():
66 return os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
68 wafdir = find_lib()
69 w = join(wafdir, 'wafadmin')
70 t = join(w, 'Tools')
71 f = join(w, '3rdparty')
72 sys.path = [w, t, f] + sys.path
74 if __name__ == '__main__':
75 import Scripting
76 Scripting.prepare(t, cwd, VERSION, wafdir)