Skip to content
Browse files

General modernization/simplification.

darcs-hash:20070114225047-de23e-8337ec0e4de156f31f8c3b5475a258cbd66b95a1.gz
  • Loading branch information...
1 parent e886195 commit 0fa42f9678cf0b378e21e48bdfdf7f925753f9f0 @pupeno committed Jan 14, 2007
Showing with 11 additions and 9 deletions.
  1. +11 −9 SConstruct
View
20 SConstruct
@@ -9,8 +9,17 @@
import os
+# Configuration.
+options = Options("options.cache")
+options.AddOptions(
+ PathOption("SCONSPREFIX", "Prefix directory for SCons", os.environ.get("PYTHON_ROOT","/usr/local")),
+ PathOption("PREFIX", "Prefix directory for everything else", "/usr/local"))
+
# Create an environment.
-env = Environment(tools = ["default", "chicken"], toolpath=["./"])
+env = Environment(tools = ["default", "chicken"], toolpath=["./"], options=options)
+
+# Save the options.
+options.Save(options.files[0], env)
# Check for Chicken.
conf = Configure(env, custom_tests = {"CheckChickenProgram" : env.CheckChickenProgram})
@@ -21,15 +30,8 @@ if not conf.CheckChickenProgram():
Exit(1)
env = conf.Finish()
-# Configuration.
-opts = Options(".scons-chicken.conf")
-opts.Add(PathOption("SCONSPREFIX", "Prefix directory for SCons", os.environ.get("PYTHON_ROOT","/usr/local")))
-opts.Add(PathOption("PREFIX", "Prefix directory for everything else", "/usr/local"))
-opts.Update(env)
-opts.Save(".scons-chicken.conf", env)
-
# Help.
-Help(opts.GenerateHelpText(env))
+Help(options.GenerateHelpText(env))
# Install directories.
sconsInstallDir = "$SCONSPREFIX/lib/scons/SCons/Tool/"

0 comments on commit 0fa42f9

Please sign in to comment.
Something went wrong with that request. Please try again.