Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory level

In the "Unix Makefiles" generator, the `ADDTIONAL_CLEAN_FILES` directory
property was evaluated on a per target basis. This had two drawbacks:
- per directory clean files were repeated in every target clean script
- per directory clean files weren't removed in directories without targets
  (issue #8164)

This patch moves the `ADDTIONAL_CLEAN_FILES` directory property processing
from the target to the directory level clean target.

Fixes: #8164 "ADDITIONAL_CLEAN_FILES directory property not respected if no
              target present in directory"
This commit is contained in:
Sebastian Holtermann
2019-05-17 17:15:50 +02:00
parent 827da1119e
commit 1ded3599d6
5 changed files with 63 additions and 18 deletions

View File

@@ -165,7 +165,8 @@ protected:
void WriteDirectoryRule2(std::ostream& ruleFileStream,
cmLocalUnixMakefileGenerator3* lg, const char* pass,
bool check_all, bool check_relink);
bool check_all, bool check_relink,
std::vector<std::string> const& commands = {});
void WriteDirectoryRules2(std::ostream& ruleFileStream,
cmLocalUnixMakefileGenerator3* lg);