diff options
author | Daniel Moody <dmoody256@gmail.com> | 2017-11-14 01:45:41 (GMT) |
---|---|---|
committer | Daniel Moody <dmoody256@gmail.com> | 2017-11-14 01:45:41 (GMT) |
commit | c22197c5f48a364e57e4cbe44734f9101cbd7e48 (patch) | |
tree | c47cd09f4adf7d8a1edf8c8278401a80b3065e5e | |
parent | 9f871ba55041bae4536b1c9b3896c6b23abedb0f (diff) | |
download | SCons-c22197c5f48a364e57e4cbe44734f9101cbd7e48.zip SCons-c22197c5f48a364e57e4cbe44734f9101cbd7e48.tar.gz SCons-c22197c5f48a364e57e4cbe44734f9101cbd7e48.tar.bz2 |
switched the order of target/source checking so no target is an option, also fixed Warning module mispelling.
-rw-r--r-- | src/engine/SCons/Tool/jar.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py index f22e68b..49600e0 100644 --- a/src/engine/SCons/Tool/jar.py +++ b/src/engine/SCons/Tool/jar.py @@ -95,6 +95,15 @@ def Jar(env, target = None, source = [], *args, **kw): Builders. """ + # jar target should not be a list so assume they passed + # no target and want implicit target to be made and the arg + # was actaully the list of sources + if SCons.Util.is_List(target) and source == []: + SCons.Warnings.Warning("Making implicit target jar file, " + + "and treating the list as sources") + source = target + target = None + # mutiple targets pass so build each target the same from the # same source #TODO Maybe this should only be done once, and the result copied @@ -105,15 +114,6 @@ def Jar(env, target = None, source = [], *args, **kw): jars += env.Jar( target = single_target, source = source, *args, **kw) return jars - # jar target should not be a list so assume they passed - # no target and want implicit target to be made and the arg - # was actaully the list of sources - if SCons.Util.is_List(target) and source == []: - SCons.Warning.Warning("Making implicit target jar file, " + - "and treating the list as sources") - source = target - target = None - # they passed no target so make a target implicitly if target == None: try: @@ -121,7 +121,7 @@ def Jar(env, target = None, source = [], *args, **kw): target = os.path.splitext(str(source[0]))[0] + env.subst('$JARSUFFIX') except: # something strange is happening but attempt anyways - SCons.Warning.Warning("Could not make implicit target from sources, using directory") + SCons.Warnings.Warning("Could not make implicit target from sources, using directory") target = os.path.basename(str(env.Dir('.'))) + env.subst('$JARSUFFIX') # make lists out of our target and sources |