summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Moody <dmoody256@gmail.com>2018-02-11 18:39:19 (GMT)
committerDaniel Moody <dmoody256@gmail.com>2018-02-11 18:39:19 (GMT)
commitb7dda62fbfface49432fd05d9c7ff507a3b381b3 (patch)
treea7ed63d2813e4ccb5a7e17444d1babeddc6f3ce7
parent900b35ab28b344b6b5597f3fdefd34de5db10d69 (diff)
downloadSCons-b7dda62fbfface49432fd05d9c7ff507a3b381b3.zip
SCons-b7dda62fbfface49432fd05d9c7ff507a3b381b3.tar.gz
SCons-b7dda62fbfface49432fd05d9c7ff507a3b381b3.tar.bz2
removed code that is not used and added warning for unusual case
-rw-r--r--src/engine/SCons/Tool/jar.py30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py
index cb7c994..5e3711a 100644
--- a/src/engine/SCons/Tool/jar.py
+++ b/src/engine/SCons/Tool/jar.py
@@ -163,19 +163,6 @@ def Jar(env, target = None, source = [], *args, **kw):
else:
return dir_targets
- # In the case that we are passed just string to a node which is directory
- # but does not exist, we need to check all the current targets to see if
- # that directory is going to exist so we can add it as a source to Jar builder
- def get_all_targets(env, node='.'):
- def get_all_targets_iter(env, node):
- if node.has_builder():
- yield node
- for kid in node.all_children():
- for kid in get_all_targets(env, kid):
- yield kid
- node = env.arg2nodes(node, env.fs.Entry)[0]
- return list(get_all_targets_iter(env, node))
-
# loop through the sources and handle each accordingly
# the goal here is to get all the source files into a class
# file or a directory that contains class files
@@ -203,21 +190,8 @@ def Jar(env, target = None, source = [], *args, **kw):
except:
pass
- if s[-len(java_suffix):] == java_suffix or s[-len(java_class_suffix):] == java_class_suffix:
- # found a file that may not exists and is only a string
- # so add it after converting it to a class file
- target_nodes.extend(file_to_class(s))
- else:
- # found a swig file so add it after converting it to class files
- if(os.path.splitext(str(s))[1] == ".i"):
- target_nodes.extend(env.JavaClassFile(source = s, *args, **kw))
- else:
- # The final else case handles anything not caught above and makes
- # sure other nodes that are sources for this jar get add as
- # a source to the JarFile builder
- for node in get_all_targets(env):
- if(s == str(node)):
- target_nodes.append(node)
+ SCons.Warnings.Warning("File: " + str(s) + " could not be identified as File or Directory, skipping.")
+
# at this point all our sources have been converted to classes or directories of class
# so pass it to the Jar builder
return env.JarFile(target = target, source = target_nodes, *args, **kw)