Describe why to use relative paths
authorFredrik Medley <fredrik.medley@gmail.com>
Thu, 3 Sep 2015 19:27:19 +0000 (21:27 +0200)
committerFredrik Medley <fredrik.medley@gmail.com>
Thu, 3 Sep 2015 19:45:42 +0000 (21:45 +0200)
Ninja does resolve relative paths and file system links in paths.
Therefore, such paths pointing to the same file will not match and may
lead to an invalid dependency graph.

Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
doc/manual.asciidoc

index 003c71e423e20d1a4c89e495cc626e4c51ee5881..47b74560015465ee37098d12701de46eeeec3c8c 100644 (file)
@@ -598,6 +598,11 @@ rule cc
   command = cl /showIncludes -c $in /Fo$out
 ----
 
+If the include directory directives are using absolute paths, your depfile
+may result in a mixture of relative and absolute paths. Paths used by other
+build rules need to match exactly. Therefore, it is recommended to use
+relative paths in these cases.
+
 [[ref_pool]]
 Pools
 ~~~~~
@@ -889,6 +894,9 @@ header file before starting a subsequent compilation step.  (Once the
 header is used in compilation, a generated dependency file will then
 express the implicit dependency.)
 
+File paths are compared as is, which means that an absolute path and a
+relative path, pointing to the same file, are considered different by Ninja.
+
 Variable expansion
 ~~~~~~~~~~~~~~~~~~