Split build options files into a static set of defaults
authorSteve Reinhardt <stever@eecs.umich.edu>
Sun, 25 Sep 2005 01:16:02 +0000 (21:16 -0400)
committerSteve Reinhardt <stever@eecs.umich.edu>
Sun, 25 Sep 2005 01:16:02 +0000 (21:16 -0400)
for committing to bk and a dynamically updated set which
are not under revision control.

build/SConstruct:
    Split build options into static defaults and dynamic "current" settings.

--HG--
rename : build/build_options/ALPHA_FS => build/build_options/default/ALPHA_FS
rename : build/build_options/ALPHA_FS_TL => build/build_options/default/ALPHA_FS_TL
rename : build/build_options/ALPHA_SE => build/build_options/default/ALPHA_SE
extra : convert_revision : 8219211a3f2ce955fd6e2c34c169cac3fc704854

build/SConstruct
build/build_options/ALPHA_FS [deleted file]
build/build_options/ALPHA_FS_TL [deleted file]
build/build_options/ALPHA_SE [deleted file]
build/build_options/default/ALPHA_FS [new file with mode: 0644]
build/build_options/default/ALPHA_FS_TL [new file with mode: 0644]
build/build_options/default/ALPHA_SE [new file with mode: 0644]

index 7f237ca775ed8210ae0e5eefa5ae1e0b26157f36..d1fa5320c4825d7bc1435845538b2829d51bc641 100644 (file)
@@ -320,12 +320,19 @@ for build_dir in build_dirs:
     # Make a copy of the default environment to use for this config.
     env = base_env.Copy()
     # Set env according to the build directory config.
-    options_file = os.path.join('build_options', build_dir)
-    if os.path.isfile(options_file):
-        sticky_opts.files = [options_file]
-    else:
-        print "Options file %s not found, using defaults." % options_file
 
+    sticky_opts.files = []
+    default_options_file = os.path.join('build_options', 'default', build_dir)
+    if os.path.isfile(default_options_file):
+        sticky_opts.files.append(default_options_file)
+    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)
+    if not sticky_opts.files:
+        print "%s: No options file found in build_options, using defaults." \
+              % build_dir
+
+    # Apply current option settings to env
     sticky_opts.Update(env)
     nonsticky_opts.Update(env)
 
@@ -353,8 +360,8 @@ for build_dir in build_dirs:
             env.ParseConfig(mysql_config_libs)
             env.ParseConfig(mysql_config_include)
 
-    # Save sticky option settings back to file
-    sticky_opts.Save(options_file, env)
+    # Save sticky option settings back to current options file
+    sticky_opts.Save(current_options_file, env)
 
     # Do this after we save setting back, or else we'll tack on an
     # extra 'qdo' every time we run scons.
diff --git a/build/build_options/ALPHA_FS b/build/build_options/ALPHA_FS
deleted file mode 100644 (file)
index ddd69b9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-FULL_SYSTEM = 1
-ALPHA_TLASER = 0
diff --git a/build/build_options/ALPHA_FS_TL b/build/build_options/ALPHA_FS_TL
deleted file mode 100644 (file)
index 4f3e201..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-FULL_SYSTEM = 1
-ALPHA_TLASER = 1
diff --git a/build/build_options/ALPHA_SE b/build/build_options/ALPHA_SE
deleted file mode 100644 (file)
index 3fedc22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-FULL_SYSTEM = 0
-SS_COMPATIBLE_FP = 1
diff --git a/build/build_options/default/ALPHA_FS b/build/build_options/default/ALPHA_FS
new file mode 100644 (file)
index 0000000..ddd69b9
--- /dev/null
@@ -0,0 +1,2 @@
+FULL_SYSTEM = 1
+ALPHA_TLASER = 0
diff --git a/build/build_options/default/ALPHA_FS_TL b/build/build_options/default/ALPHA_FS_TL
new file mode 100644 (file)
index 0000000..4f3e201
--- /dev/null
@@ -0,0 +1,2 @@
+FULL_SYSTEM = 1
+ALPHA_TLASER = 1
diff --git a/build/build_options/default/ALPHA_SE b/build/build_options/default/ALPHA_SE
new file mode 100644 (file)
index 0000000..3fedc22
--- /dev/null
@@ -0,0 +1,2 @@
+FULL_SYSTEM = 0
+SS_COMPATIBLE_FP = 1