summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-11 17:04:00 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-11 17:04:00 (GMT)
commit97ece7f03bffd693693e7da376a3a7058d14b7a7 (patch)
tree7517de7e6ea6c01b8999f8f2d1ada488beb61b1b /src
parent6bea3fd00327560933ef42779a58ac3e11f187c8 (diff)
downloadSCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.zip
SCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.tar.gz
SCons-97ece7f03bffd693693e7da376a3a7058d14b7a7.tar.bz2
Add -I support.
Diffstat (limited to 'src')
-rw-r--r--src/scons.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scons.py b/src/scons.py
index 500910d..f515bea 100644
--- a/src/scons.py
+++ b/src/scons.py
@@ -59,6 +59,7 @@ class Taskmaster:
local_help = None
num_jobs = 1
Scripts = []
+include_dirs = []
# utility functions
@@ -315,7 +316,11 @@ def options_init():
short = 'i', long = ['ignore-errors'],
help = "Ignore errors from build actions.")
- Option(func = opt_not_yet,
+ def opt_I(opt, arg):
+ global include_dirs
+ include_dirs = include_dirs + [arg]
+
+ Option(func = opt_I,
short = 'I', long = ['include-dir'], arg = 'DIRECTORY',
help = "Search DIRECTORY for imported Python modules.")
@@ -504,6 +509,8 @@ def main():
#
#sys.path = dirlist
+ sys.path = include_dirs + sys.path
+
# initialize node factory
init()