summaryrefslogtreecommitdiff
path: root/gch.py
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-08-11 12:38:57 +0200
committerAntonin Kral <a.kral@bobek.cz>2010-08-11 12:38:57 +0200
commit7645618fd3914cb8a20561625913c20d49504a49 (patch)
tree8370f846f58f6d71165b7a0e2eda04648584ec76 /gch.py
parent68c73c3c7608b4c87f07440dc3232801720b1168 (diff)
downloadmongodb-7645618fd3914cb8a20561625913c20d49504a49.tar.gz
Imported Upstream version 1.6.0
Diffstat (limited to 'gch.py')
-rw-r--r--gch.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gch.py b/gch.py
index e5ff601..61060c6 100644
--- a/gch.py
+++ b/gch.py
@@ -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)