summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script/Main.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Script/Main.py')
-rw-r--r--src/engine/SCons/Script/Main.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 8156208..e5a8cb2 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -1080,10 +1080,11 @@ def _main(args, parser):
fs.set_max_drift(ssoptions.get('max_drift'))
lookup_top = None
- if SCons.Script.BUILD_TARGETS:
- # They specified targets on the command line, so if they
- # used -u, -U or -D, we have to look up targets relative
- # to the top, but we build whatever they specified.
+ if targets or SCons.Script.BUILD_TARGETS != SCons.Script._build_plus_default:
+ # They specified targets on the command line or modified
+ # BUILD_TARGETS in the SConscript file(s), so if they used -u,
+ # -U or -D, we have to look up targets relative to the top,
+ # but we build whatever they specified.
if target_top:
lookup_top = fs.Dir(target_top)
target_top = None