fix makefile output, ignore empty paths

This commit is contained in:
Julian Daube 2017-10-08 03:36:45 +02:00
parent 0311fd91ae
commit ccd3fa09a1

View File

@ -333,6 +333,7 @@ InputExtractor::List InputExtractor::operator()(const Substring &input){
CommandList IncludeCommands; CommandList IncludeCommands;
IncludeCommands["input"] = [](List &l, std::string a) { IncludeCommands["input"] = [](List &l, std::string a) {
if (a.empty()) return;
if (Extension(a) != ".tex") a += ".tex"; if (Extension(a) != ".tex") a += ".tex";
l.push_back(a); l.push_back(a);
// try to extract all inputs of that file // try to extract all inputs of that file
@ -440,7 +441,7 @@ int main(int argc, char ** args) {
if (!output) { if (!output) {
std::cout << "could not create output file" << std::endl; std::cout << "could not create output file" << std::endl;
} else { } else {
output << "filename: "; output << filename << ": ";
for (auto it = list.begin(); it != list.end(); it++) { for (auto it = list.begin(); it != list.end(); it++) {
output << '\t'; output << '\t';
@ -454,7 +455,7 @@ int main(int argc, char ** args) {
} else { } else {
output << *it; output << *it;
} }
output << "\\\\\n"; output << "\t\\\n";
} }
output << endl; output << endl;
} }