Ninja: ninja can't read dep. pathes with parentheses
This commit is contained in:
parent
5590625fa3
commit
12cc6434bf
@ -578,8 +578,8 @@ static void outputDepFile(const string& dfile, const string& objfile,
|
|||||||
tmp = *i;
|
tmp = *i;
|
||||||
doEscape(tmp, "\\", "/");
|
doEscape(tmp, "\\", "/");
|
||||||
doEscape(tmp, " ", "\\ ");
|
doEscape(tmp, " ", "\\ ");
|
||||||
//doEscape(tmp, "(", "("); // TODO ninja cant read ( and )
|
//doEscape(tmp, "(", "\\("); // TODO ninja can't read ( and )
|
||||||
//doEscape(tmp, ")", ")");
|
//doEscape(tmp, ")", "\\)");
|
||||||
fprintf(out, "%s \\\n", tmp.c_str());
|
fprintf(out, "%s \\\n", tmp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -637,12 +637,9 @@ int main() {
|
|||||||
string line;
|
string line;
|
||||||
vector<string> includes;
|
vector<string> includes;
|
||||||
bool isFirstLine = true; // cl prints always first the source filename
|
bool isFirstLine = true; // cl prints always first the source filename
|
||||||
std::string sysHeadersCamel = "Program Files (x86)\\Microsoft ";
|
|
||||||
std::string sysHeadersLower = "program files (x86)\\microsoft ";
|
|
||||||
while (getline(ss, line)) {
|
while (getline(ss, line)) {
|
||||||
if (startsWith(line, prefix)) {
|
if (startsWith(line, prefix)) {
|
||||||
if (!contains(line, sysHeadersCamel)
|
if (!contains(line, "(") && !contains(line, ")")) {
|
||||||
&& !contains(line, sysHeadersLower)) {
|
|
||||||
string inc = trimLeadingSpace(line.substr(prefix.size()).c_str());
|
string inc = trimLeadingSpace(line.substr(prefix.size()).c_str());
|
||||||
if (inc[inc.size() - 1] == '\r') // blech, stupid \r\n
|
if (inc[inc.size() - 1] == '\r') // blech, stupid \r\n
|
||||||
inc = inc.substr(0, inc.size() - 1);
|
inc = inc.substr(0, inc.size() - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user