summaryrefslogtreecommitdiffstats
path: root/src/depfile_parser.in.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-07 20:14:30 (GMT)
committerEvan Martin <martine@danga.com>2011-12-07 20:14:30 (GMT)
commit8aae49d6f74fa5124f080de814c7ff37144b6373 (patch)
treefb864bdd89dfca2f3952601bc384bc3b8eb21aa2 /src/depfile_parser.in.cc
parentbf72e45180e1dd80d9efea8d2acebcac15ea12a4 (diff)
downloadNinja-8aae49d6f74fa5124f080de814c7ff37144b6373.zip
Ninja-8aae49d6f74fa5124f080de814c7ff37144b6373.tar.gz
Ninja-8aae49d6f74fa5124f080de814c7ff37144b6373.tar.bz2
remove makefile parsing code, use depfile code instead
Diffstat (limited to 'src/depfile_parser.in.cc')
-rw-r--r--src/depfile_parser.in.cc12
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();