blob: c700f779ff5deb8f1c05b0fb129f2e2a36f81ef6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/usr/bin/env python
import getopt
import os.path
import string
import sys
opts, targets = getopt.getopt(sys.argv[1:], 'f:')
Scripts = []
for o, a in opts:
if o == '-f': Scripts.append(a)
if not Scripts:
Scripts.append('SConstruct')
# XXX The commented-out code here adds any "scons" subdirs in anything
# along sys.path to sys.path. This was an attempt at setting up things
# so we can import "node.FS" instead of "scons.Node.FS". This doesn't
# quite fit our testing methodology, though, so save it for now until
# the right solutions pops up.
#
#dirlist = []
#for dir in sys.path:
# scons = os.path.join(dir, 'scons')
# if os.path.isdir(scons):
# dirlist = dirlist + [scons]
# dirlist = dirlist + [dir]
#
#sys.path = dirlist
from scons.Node.FS import init, Dir, File, lookup
from scons.Environment import Environment
init()
def Conscript(filename):
Scripts.append(filename)
while Scripts:
file, Scripts = Scripts[0], Scripts[1:]
execfile(file)
for path in targets:
target = lookup(File, path)
target.build()
|