summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-10-09 21:06:16 (GMT)
committerSteven Knight <knight@baldmt.com>2002-10-09 21:06:16 (GMT)
commita788145cf0d0e87d1f279fb43c48bfec21dedcd7 (patch)
tree4be7af1f62fed7f1c8d71d01eea278dc784361b7 /doc
parent16883a48bcbed63c40382dfa94d352c0fecfe0de (diff)
downloadSCons-a788145cf0d0e87d1f279fb43c48bfec21dedcd7.zip
SCons-a788145cf0d0e87d1f279fb43c48bfec21dedcd7.tar.gz
SCons-a788145cf0d0e87d1f279fb43c48bfec21dedcd7.tar.bz2
Allow build/doc/version.sgml to be created on build even if the build/doc/ subdirectory doesn't exist.
Diffstat (limited to 'doc')
-rw-r--r--doc/SConscript11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/SConscript b/doc/SConscript
index 229cf25..29801ef 100644
--- a/doc/SConscript
+++ b/doc/SConscript
@@ -1,8 +1,6 @@
#
# SConscript file for building SCons documentation.
#
-# THIS IS NOT READY YET. DO NOT TRY TO BUILD SCons WITH ITSELF YET.
-#
#
# Copyright (c) 2001, 2002 Steven Knight
@@ -109,8 +107,13 @@ if jw:
verfile = str(File("version.sgml"))
try:
os.unlink(verfile)
- except:
- pass
+ except OSError:
+ pass # okay if the file didn't exist
+ dir, f = os.path.split(verfile)
+ try:
+ os.makedirs(dir)
+ except OSError:
+ pass # okay if the directory already exists
open(verfile, "w").write("""<!--
THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
-->