diff options
Diffstat (limited to 'src/depfile_parser.in.cc')
-rw-r--r-- | src/depfile_parser.in.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/depfile_parser.in.cc b/src/depfile_parser.in.cc index 1e22ca9..3d9a77e 100644 --- a/src/depfile_parser.in.cc +++ b/src/depfile_parser.in.cc @@ -14,6 +14,18 @@ #include "depfile_parser.h" +// A note on backslashes in Makefiles, from reading the docs: +// Backslash-newline is the line continuation character. +// Backslash-# escapes a # (otherwise meaningful as a comment start). +// Backslash-% escapes a % (otherwise meaningful as a special). +// Finally, quoting the GNU manual, "Backslashes that are not in danger +// of quoting ‘%’ characters go unmolested." +// How do you end a line with a backslash? The netbsd Make docs suggest +// reading the result of a shell command echoing a backslash! +// +// Rather than implement the above, we do the simpler thing here. +// If anyone actually has depfiles that rely on the more complicated +// behavior we can adjust this. bool DepfileParser::Parse(const string& content, string* err) { const char* p = content.data(); const char* end = content.data() + content.size(); |