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 | b1143ee5d16b0c9ee0c68e5aeedc02e425e61eba (patch) | |
tree | fa12d99dfce54651222419d19bf345f49177c5ea /src/engine | |
parent | 44d72b613a8b171deec8a83b2d1e1755abcba480 (diff) | |
download | SCons-b1143ee5d16b0c9ee0c68e5aeedc02e425e61eba.zip SCons-b1143ee5d16b0c9ee0c68e5aeedc02e425e61eba.tar.gz SCons-b1143ee5d16b0c9ee0c68e5aeedc02e425e61eba.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')
-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): |