summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi8
-rwxr-xr-xbuild/dir_exists.py10
-rw-r--r--content/content.gyp2
3 files changed, 14 insertions, 6 deletions
diff --git a/build/common.gypi b/build/common.gypi
index e64e436..f3f3e94 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1316,8 +1316,8 @@
# Contains data about the attached devices for gyp_managed_install.
'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
- 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")',
- 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")',
+ 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")',
+ 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")',
'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
@@ -1419,12 +1419,12 @@
}, {
'gcc_version%': 0,
}],
- ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
+ ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
'windows_sdk_path%': '<(windows_sdk_default_path)',
}, {
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
}],
- ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
+ ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
'directx_sdk_path%': '<(directx_sdk_default_path)',
}, {
'directx_sdk_path%': '$(DXSDK_DIR)',
diff --git a/build/dir_exists.py b/build/dir_exists.py
index 0a89bc8..70d367e 100755
--- a/build/dir_exists.py
+++ b/build/dir_exists.py
@@ -8,8 +8,16 @@ import os.path
import sys
def main():
- sys.stdout.write(str(os.path.isdir(sys.argv[1])))
+ sys.stdout.write(_is_dir(sys.argv[1]))
return 0
+def _is_dir(dir_name):
+ return str(os.path.isdir(dir_name))
+
+def DoMain(args):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ return _is_dir(args[0])
+
if __name__ == '__main__':
sys.exit(main())
diff --git a/content/content.gyp b/content/content.gyp
index d4cacf7..5cc8747 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -6,7 +6,7 @@
'variables': {
'chromium_code': 1, # Use higher warning level.
'chromium_enable_vtune_jit_for_v8%': 0, # enable the vtune support for V8 engine.
- 'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
+ 'directxsdk_exists': '<!pymod_do_main(dir_exists ../third_party/directxsdk)',
},
'target_defaults': {
'defines': ['CONTENT_IMPLEMENTATION'],