Re:Show HN: My C compiler compiled itself
by fuzztester on Wednesday December 04, 2024 @12:38PM
(#42319843)
>Lastly, it has “caching” built in:
A nitpick, but I don't think that should really be called caching, although it kind of is, in a looser sense. It's just comparing the file timestamps of the .o and .c files, and building the .o from the .c, if the .c is newer, or if the .o doesn't exist.
Re:Show HN: My C compiler compiled itself
by IgorPartola on Wednesday December 04, 2024 @11:45PM
(#42325056)
I mean it’s caching using a key derivation scheme which uses file names rather than file contents. It might not be sophisticated caching but it is caching.
It also has “phony” targets that aren’t files. The canonical example of this is “clean” which basically just does something like rm -rf *.o fooexec
This is what the JavaScript tooling people have been chasing for the past 15 years and can’t seem to grasp. Someone actually did build a make-based build system I believe but it never got popular because it wasn’t written in JavaScript.