diff options
author | Steven Knight <knight@baldmt.com> | 2004-02-26 05:56:51 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-02-26 05:56:51 (GMT) |
commit | dfa9ded59f8641221328e2da7a06698a1b367ef1 (patch) | |
tree | cc4a700d072dff78736d245d7c664be7ad2d32f0 /src/engine/SCons/Tool/jar.py | |
parent | b0656def14f9b2f7feff88301420c1dee99ac670 (diff) | |
download | SCons-dfa9ded59f8641221328e2da7a06698a1b367ef1.zip SCons-dfa9ded59f8641221328e2da7a06698a1b367ef1.tar.gz SCons-dfa9ded59f8641221328e2da7a06698a1b367ef1.tar.bz2 |
Initialize *FLAGS variables with objects that can add flags either as strings or lists.
Diffstat (limited to 'src/engine/SCons/Tool/jar.py')
-rw-r--r-- | src/engine/SCons/Tool/jar.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/engine/SCons/Tool/jar.py b/src/engine/SCons/Tool/jar.py index 5fcb205..7934ed2 100644 --- a/src/engine/SCons/Tool/jar.py +++ b/src/engine/SCons/Tool/jar.py @@ -37,6 +37,7 @@ import glob import os.path import SCons.Builder +import SCons.Util def jarSources(target, source, env, for_signature): """Only include sources that are not a manifest file.""" @@ -63,13 +64,14 @@ def jarManifest(target, source, env, for_signature): def jarFlags(target, source, env, for_signature): """If we have a manifest, make sure that the 'm' flag is specified.""" + jarflags = env.subst('$JARFLAGS') for src in source: contents = src.get_contents() if contents[:16] == "Manifest-Version": - if not 'm' in env['JARFLAGS']: - return env['JARFLAGS'] + 'm' + if not 'm' in jarflags: + return jarflags + 'm' break - return env['JARFLAGS'] + return jarflags def jarChdir(target, source, env, for_signature): """If we have an Environment variable by the name @@ -91,7 +93,7 @@ def generate(env): env['BUILDERS']['Jar'] = JarBuilder env['JAR'] = 'jar' - env['JARFLAGS'] = 'cf' + env['JARFLAGS'] = SCons.Util.CLVar('cf') env['_JARFLAGS'] = jarFlags env['_JARMANIFEST'] = jarManifest env['_JARSOURCES'] = jarSources |