Source

SCons / src / scons.py

#!/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()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.