Message:
Few more tests pass.
Description:
- Another normpath (slightly concerned about this one for other platforms?
but
it makes the build files a lot more consistent on Windows)
- Fix copy rule for windows (mklink directory if file fails)
Please review this at https://chromiumcodereview.appspot.com/9422025/
SVN Base: http://gyp.googlecode.com/svn/trunk/
Affected files:
M pylib/gyp/generator/ninja.py
Index: pylib/gyp/generator/ninja.py
===================================================================
--- pylib/gyp/generator/ninja.py (revision 1211)
+++ pylib/gyp/generator/ninja.py (working copy)
@@ -213,7 +213,7 @@
path = path.replace(INTERMEDIATE_DIR,
os.path.join(product_dir or '', int_dir))
- return path
+ return os.path.normpath(path)
def ExpandRuleVariables(self, path, root, dirname, source, ext, name):
path = path.replace(generator_default_variables['RULE_INPUT_ROOT'],
root)
@@ -1183,7 +1183,7 @@
master_ninja.rule(
'copy',
description='COPY $in $out',
- command='mklink /h $out $in >nul')
+ command='cmd /c mklink /h $out $in >nul || mklink /h /j $out $in
>nul')
else:
master_ninja.rule(
'copy',
https://chromiumcodereview.appspot.com/9422025/diff/1002/pylib/gyp/generator/ninja.py#newcode205
pylib/gyp/generator/ninja.py:205: path = path.replace(PRODUCT_DIR +
'\\', '')
The two above lines can now be removed, as the one below this point will
result in "./" which normpath will clean up.
Looks like some actions have an empty "" in their actions: [] as the first
argument. normpath converts that to '.' which happens to work for scripts
but
it's a bit weird anyway. (I'm actually not sure that that's the failure on
Mac,
but I'll revert for now and see if there's a better place to do the
normalize.)
If the input files are wrong, another path is to fix the input files
(and make gyp sanity-check this problem so it doesn't reoccur).
See r1176 for an example.