Create build_options/current dir when necessary.
authorSteve Reinhardt <stever@eecs.umich.edu>
Sun, 25 Sep 2005 01:24:44 +0000 (21:24 -0400)
committerSteve Reinhardt <stever@eecs.umich.edu>
Sun, 25 Sep 2005 01:24:44 +0000 (21:24 -0400)
build/SConstruct:
    Need to create build_options/current the first time through.

--HG--
extra : convert_revision : 13bf8c69a4a30671283a8b789ed21875b2301f24

build/SConstruct

index d1fa5320c4825d7bc1435845538b2829d51bc641..e7ec87a53a7a4cc8a278cef34b8ca34b4308e0f0 100644 (file)
@@ -328,6 +328,12 @@ for build_dir in build_dirs:
     current_options_file = os.path.join('build_options', 'current', build_dir)
     if os.path.isfile(current_options_file):
         sticky_opts.files.append(current_options_file)
+    else:
+        # if file doesn't exist, make sure at least the directory is there
+        # so we can create it later
+        opt_dir = os.path.dirname(current_options_file)
+        if not os.path.isdir(opt_dir):
+            os.mkdir(opt_dir)
     if not sticky_opts.files:
         print "%s: No options file found in build_options, using defaults." \
               % build_dir