fix makefile output, ignore empty paths
This commit is contained in:
		
							parent
							
								
									0311fd91ae
								
							
						
					
					
						commit
						ccd3fa09a1
					
				
							
								
								
									
										5
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.cpp
									
									
									
									
									
								
							@ -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;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user