I see the allure of the original suggestion too: explicitness is generally better than implicit magic, and it’s good to be clear about exactly who’s responsibility it is to make the incremental compilation information accurate. However I think, in practice, the syscall-tracing method could be extremely accurate.
Breaking it down, there’s two ways either of these methods could fail: (a) they fail to recompile when they should or (b) they recompile spuriously.
For (a), I think the syscall-tracing method is guaranteed to work all the time. By comparison, if we make the macro author pass the information to the compiler it’s possible that they could fail to pass some relevant piece of information. Bugs like that are likely to be fairly common, but at least the user would know where to file a bug-report.
For (b), it’s possible that a macro could iterate a directory for no reason, causing the syscall-tracing compiler to recompile the project every time that directory gets touched, but this is a pretty contrived scenario which is unlikely to occur very often in practice. It’s also possible that a crappy macro could pass spurious information to the compiler and cause the same thing. Either way it just means that compiler will end up doing more work than it needs to.
This is all assuming that macros are deterministic and only get information from things that the compiler can watch or control (eg. the filesystem, environment variables, etc). If this assumption fails then neither method can work.