diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-06 15:40:59 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-06 15:40:59 (GMT) |
commit | b967a4a50e7ad193583412bc5a585acde1fddbe7 (patch) | |
tree | f6f071523c90ec14c5835e69fe9272dc02b90d55 /src/engine/SCons/Tool/jar.py | |
parent | a2b9b257fec5cc6ec8a7a14ede42e8ae0c55ba98 (diff) | |
download | SCons-b967a4a50e7ad193583412bc5a585acde1fddbe7.zip SCons-b967a4a50e7ad193583412bc5a585acde1fddbe7.tar.gz SCons-b967a4a50e7ad193583412bc5a585acde1fddbe7.tar.bz2 |
Java!
Diffstat (limited to 'src/engine/SCons/Tool/jar.py')
-rw-r--r-- | src/engine/SCons/Tool/jar.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py new file mode 100644 index 0000000..496a823 --- /dev/null +++ b/src/engine/SCons/Tool/jar.py @@ -0,0 +1,58 @@ +"""SCons.Tool.jar + +Tool-specific initialization for jar. + +There normally shouldn't be any need to import this module directly. +It will usually be imported through the generic SCons.Tool.Tool() +selection method. + +""" + +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import glob +import os.path + +import SCons.Builder + +def generate(env, platform): + """Add Builders and construction variables for jar to an Environment.""" + try: + bld = env['BUILDERS']['Jar'] + except KeyError: + JarBuilder = SCons.Builder.Builder(action = '$JARCOM', + source_factory = SCons.Node.FS.default_fs.Entry, + suffix = '$JARSUFFIX') + + env['BUILDERS']['Jar'] = JarBuilder + + env['JAR'] = 'jar' + env['JARFLAGS'] = 'cf' + env['JARCOM'] = '$JAR $JARFLAGS $TARGET $SOURCE' + env['JARSUFFIX'] = '.jar' + +def exists(env): + return env.Detect('jar') |