diff options
author | Steven Knight <knight@baldmt.com> | 2005-09-29 07:54:29 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-09-29 07:54:29 (GMT) |
commit | 6eccd4f877951395160ff171db5d52b31da0174e (patch) | |
tree | fa12d99dfce54651222419d19bf345f49177c5ea /src/engine/SCons/Tool/jar.py | |
parent | 0d2cb0988d25be7125e27d4a7fa965c8ba04c585 (diff) | |
download | SCons-6eccd4f877951395160ff171db5d52b31da0174e.zip SCons-6eccd4f877951395160ff171db5d52b31da0174e.tar.gz SCons-6eccd4f877951395160ff171db5d52b31da0174e.tar.bz2 |
When building a .jar file and $JARCHDIR is set, prefix each .class file with the -C flag. (Kian Win Ong)
Diffstat (limited to 'src/engine/SCons/Tool/jar.py')
-rw-r--r-- | src/engine/SCons/Tool/jar.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py index b069990..ed93412 100644 --- a/src/engine/SCons/Tool/jar.py +++ b/src/engine/SCons/Tool/jar.py @@ -48,6 +48,8 @@ def jarSources(target, source, env, for_signature): # If we are changing the dir with -C, then sources should # be relative to that directory. src = src.get_path(src.fs.Dir(jarchdir)) + result.append('-C') + result.append(jarchdir) result.append(src) return result @@ -71,14 +73,6 @@ def jarFlags(target, source, env, for_signature): break return jarflags -def jarChdir(target, source, env, for_signature): - """If we have an Environment variable by the name - of JARCHDIR, then supply the command line option - '-C <dir>' to Jar.""" - if env.has_key('JARCHDIR'): - return [ '-C', '$JARCHDIR' ] - return [] - JarAction = SCons.Action.Action('$JARCOM', '$JARCOMSTR') JarBuilder = SCons.Builder.Builder(action = JarAction, @@ -97,8 +91,7 @@ def generate(env): env['_JARFLAGS'] = jarFlags env['_JARMANIFEST'] = jarManifest env['_JARSOURCES'] = jarSources - env['_JARCHDIR'] = jarChdir - env['JARCOM'] = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARCHDIR $_JARSOURCES' + env['JARCOM'] = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES' env['JARSUFFIX'] = '.jar' def exists(env): |