2 ms·
Hm yes I just figured that out the hard way -- <scratching head>. This feels hacky, but yes it seems to work. I'll think about it a bit more. (I might clone
by chubot 9y ago
Hm yes I just figured that out the hard way -- <scratching head>.
This feels hacky, but yes it seems to work. I'll think about it a bit more. (I might clone this feature for a build tool -- since the gcc/Clang support is already there, it seems like any serious build tool needs this. Although some have their own #include scanners which is odd.)
Thanks for the information!
- rossy 9y agoI guess a simple way of explaining it is that if there are any new header dependencies, one of the files that make already knows about must have been modified to add the #include statement, so make will correctly rebuild the .c file and generate the new .d file, even though it's working on outdated dependency information. Though, I guess I wasn't quite correct either. See plorkyeran's sibling comment re: generated header files.
- int_19h 9y ago> Although some have their own #include scanners which is odd. I once worked in a place that had its own #include scanner (partially because it used so many different compilers and other tools... suffice it to say that Watcom C++ was in the mix). To make it work, you had to install a custom filesystem driver that intercepted disk reads during compilation and logged them. A rather... bruteforce approach. But it had the advantage of working with everything.