diff options
author | Antonin Kral <a.kral@bobek.cz> | 2010-08-11 12:38:57 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2010-08-11 12:38:57 +0200 |
commit | 7645618fd3914cb8a20561625913c20d49504a49 (patch) | |
tree | 8370f846f58f6d71165b7a0e2eda04648584ec76 /gch.py | |
parent | 68c73c3c7608b4c87f07440dc3232801720b1168 (diff) | |
download | mongodb-7645618fd3914cb8a20561625913c20d49504a49.tar.gz |
Imported Upstream version 1.6.0
Diffstat (limited to 'gch.py')
-rw-r--r-- | gch.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -37,6 +37,9 @@ GchShAction = SCons.Action.Action('$GCHSHCOM', '$GCHSHCOMSTR') def gen_suffix(env, sources): return sources[0].get_suffix() + env['GCHSUFFIX'] +def header_path(node): + path = node.path + return path[:-4] # strip final '.gch' GchShBuilder = SCons.Builder.Builder(action = GchShAction, source_scanner = SCons.Scanner.C.CScanner(), @@ -54,7 +57,7 @@ def static_pch_emitter(target,source,env): deps = scanner(source[0], env, path) if env.has_key('Gch') and env['Gch']: - if env['Gch'].path.strip('.gch') in [x.path for x in deps]: + if header_path(env['Gch']) in [x.path for x in deps]: env.Depends(target, env['Gch']) return (target, source) @@ -67,7 +70,7 @@ def shared_pch_emitter(target,source,env): deps = scanner(source[0], env, path) if env.has_key('GchSh') and env['GchSh']: - if env['GchSh'].path.strip('.gch') in [x.path for x in deps]: + if header_path(env['GchSh']) in [x.path for x in deps]: env.Depends(target, env['GchSh']) return (target, source) |