summaryrefslogtreecommitdiffstats
path: root/src/scons.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-10 23:38:55 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-10 23:38:55 (GMT)
commit41a56f7c2d2faac0b6a084e591de3faa1a3e79ff (patch)
tree7aacb222c2e89cdc423842a0a137a9df30e0f862 /src/scons.py
parent5baa0ff42fc922008a0a148bef7da73b09f0dfbd (diff)
downloadSCons-41a56f7c2d2faac0b6a084e591de3faa1a3e79ff.zip
SCons-41a56f7c2d2faac0b6a084e591de3faa1a3e79ff.tar.gz
SCons-41a56f7c2d2faac0b6a084e591de3faa1a3e79ff.tar.bz2
Add -C support.
Diffstat (limited to 'src/scons.py')
-rw-r--r--src/scons.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/scons.py b/src/scons.py
index f624fba..66932f6 100644
--- a/src/scons.py
+++ b/src/scons.py
@@ -248,7 +248,13 @@ Option(func = opt_not_yet, future = 1,
long = ['cache-show'],
help = "Print what would have built Cached targets.")
-Option(func = opt_not_yet,
+def opt_C(opt, arg):
+ try:
+ os.chdir(arg)
+ except:
+ sys.stderr.write("Could not change directory to 'arg'\n")
+
+Option(func = opt_C,
short = 'C', long = ['directory'], arg = 'DIRECTORY',
help = "Change to DIRECTORY before doing anything.")