In a classic MAKEfile, it was easy to list the main file and then all the dependent files (e.g. Include files) in a rule.
I thought that MSBuild had some attribute in the target for that, but it seems not! Given a list of input files and a transformation from input file to output file name, it runs the Target once for each input file, and skips it if the input file is not newer than the output file.
So how can you retain that behavior, and furthermore NOT SKIP if any of the dependent files are newer, too? The dependent files are noted from an earlier build, and I know how to read a text file into an Item array. But each input has a different list of dependent files, and I don't see how to tell the Target when it's OK or not OK to skip.
I see the logic for CL (the C and C++ compiler) is not handled in the MSBuild script at all! The "Task" for CL, which wraps the call to cl.exe, makes that determination and simply doesn't call cl.exe. But the Target never skips at all and feeds CL every input file.
I wonder if there's a useful way to do that directly in MSBuild without writing code in .NET to do the real work.