about summary refs log tree commit diff stats
path: root/gyp_uv_link
diff options
context:
space:
mode:
Diffstat (limited to 'gyp_uv_link')
-rwxr-xr-xgyp_uv_link20
1 files changed, 7 insertions, 13 deletions
diff --git a/gyp_uv_link b/gyp_uv_link
index e174485..73251d6 100755
--- a/gyp_uv_link
+++ b/gyp_uv_link
@@ -52,20 +52,14 @@ def run_gyp(args):
 if __name__ == '__main__':
   args = sys.argv[1:]
 
-  # GYP bug.
-  # On msvs it will crash if it gets an absolute path.
-  # On Mac/make it will crash if it doesn't get an absolute path.
-  if sys.platform == 'win32':
-    args.append(os.path.join(root, 'uv_link_t.gyp'))
-    common_fn  = os.path.join(root, 'common.gypi')
-    options_fn = os.path.join(root, 'options.gypi')
-    # we force vs 2010 over 2008 which would otherwise be the default for gyp
-    if not os.environ.get('GYP_MSVS_VERSION'):
-      os.environ['GYP_MSVS_VERSION'] = '2010'
-  else:
+  if 'test' not in args:
     args.append(os.path.join(os.path.abspath(root), 'uv_link_t.gyp'))
-    common_fn  = os.path.join(os.path.abspath(root), 'common.gypi')
-    options_fn = os.path.join(os.path.abspath(root), 'options.gypi')
+  else:
+    args.append(os.path.join(os.path.abspath(root), 'test/test.gyp'))
+    args = filter(lambda arg: arg != 'test', args)
+
+  common_fn  = os.path.join(os.path.abspath(root), 'common.gypi')
+  options_fn = os.path.join(os.path.abspath(root), 'options.gypi')
 
   if os.path.exists(common_fn):
     args.extend(['-I', common_fn])