From: stevenknight Date: Wed, 9 Oct 2002 21:06:16 +0000 (+0000) Subject: Allow build/doc/version.sgml to be created on build even if the build/doc/ subdirecto... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=38274b2d787c040caf49902f9e374375dcc459ca;p=scons.git Allow build/doc/version.sgml to be created on build even if the build/doc/ subdirectory doesn't exist. git-svn-id: http://scons.tigris.org/svn/scons/trunk@477 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/doc/SConscript b/doc/SConscript index 229cf25c..29801efc 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("""