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
1 changed files with 3 additions and 2 deletions

View File

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