From e2f06e01debc7865a4ad2748043ee478943fa65b Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sun, 25 Jan 2004 02:07:36 +0000 Subject: [PATCH] Fix ARGUMENTS specifications on the command line that have multiple = in them. (Zephaniah Hull) git-svn-id: http://scons.tigris.org/svn/scons/trunk@885 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Script/SConscript.py | 2 +- test/ARGUMENTS.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f03e7bd2..ffcfe919 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -84,6 +84,10 @@ RELEASE 0.95 - XXX of them from cache, not just the first target, and exec the build command if any of the targets isn't present in the cache. + From Zephaniah Hull: + + - Fix command-line ARGUMENTS with multiple = in them. + From Steven Knight: - Fix EnsureSConsVersion() so it checks against the SCons version, diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 521429f2..90e1fe17 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -86,7 +86,7 @@ sconscript_reading = 0 def _scons_add_args(alist): for arg in alist: - a, b = string.split(arg, '=', 2) + a, b = string.split(arg, '=', 1) Arguments[a] = b def _scons_add_targets(tlist): diff --git a/test/ARGUMENTS.py b/test/ARGUMENTS.py index ab1f806d..69947a66 100644 --- a/test/ARGUMENTS.py +++ b/test/ARGUMENTS.py @@ -37,11 +37,12 @@ for k in keys: foo.close() """) -test.run(arguments='a=1 bz=3 xx=sd .') +test.run(arguments='a=1 bz=3 xx=sd zzz=foo=bar .') test.fail_test(test.read('foo.out') != """a = 1 bz = 3 xx = sd +zzz = foo=bar """) test.pass_test() -- 2.26.2