summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct8
1 files changed, 7 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 4c5b2aaa..47e8ba47 100644
--- a/SConstruct
+++ b/SConstruct
@@ -166,7 +166,7 @@ boolopts = (
("chrpath", False, "use chrpath to edit library load paths"),
("manbuild", True, "build help in man and HTML formats"),
("leapfetch", True, "fetch up-to-date data on leap seconds."),
- ("minimal", False, "default all optional features to off"),
+ ("minimal", False, "turn off every option not set on the command line"),
# Test control
("slow", False, "run tests with realistic (slow) delays"),
)
@@ -236,6 +236,12 @@ env = Environment(tools=["default", "tar", "textfile"], options=opts, ENV=envs)
opts.Save('.scons-option-cache', env)
env.SConsignFile(".sconsign.dblite")
+# Minimal build turns off every option not set on the command line,
+if env['minimal']:
+ for (name, default, help) in boolopts:
+ if default == True and not ARGUMENTS.get(name):
+ env[name] = False
+
for (name, default, help) in pathopts:
env[name] = env.subst(env[name])