-
Notifications
You must be signed in to change notification settings - Fork 39
hp2ps depends on "ghcautoconf.h" and "ghcplatform.h", but does not yet need it. #48
Comments
I have a bad feeling about this. What happens is:
Not sure what's the best way to proceed with this. I can add a manual dependency: need |
@ndmitchell Have you got any idea on how to handle this nicely? I don't have anything except for needing generated files explicitly. |
I've added explicit dependencies. We may come back to this issue if a better approach is discovered. |
Hi, I've been Unfortunately, the non-lexical way CPP works makes things more complicated in that macros defined in headers included earlier influence the dependencies of headers included later. I propse adding at the back of the |
@Ericson2314 Hi there! Adding a directory with fake files is a nice trick. I don't see how it helps though: we still need to explicitly list these files somewhere: we list them as dependencies in |
One quite easy solution is to orderOnly depend on those files before running -MM. That ensures the files exists, but doesn't depend on them, and then -MM can spot them properly. The advantage of orderOnly is you can be much more free with it as it will reduce parallelism by a very tiny amount, but won't cause unnecessary rebuilds. |
@ndmitchell Thanks! I didn't think of order-only dependencies. Looking at the Shake documentation this is exactly the intended use case for (In an ideal world we would have a dependency discovery mechanism that would call |
Well, in general CPP variables can be used in the However, intercepting file access, as proposed in that linked issue, is the best of all worlds. Dirt simple, no up-front lists, and builds only the headers that are needed. |
and after
./shake-build/build.sh includes/ghcautoconf.h
The text was updated successfully, but these errors were encountered: