4 ms·
I don't want to get too bogged down here, but sure: When you use autoconf, you typically run configure, then you're left with a config.h, which then parameteri
by wingo 16y ago
I don't want to get too bogged down here, but sure:
When you use autoconf, you typically run configure, then you're left with a config.h, which then parameterizes later builds.
On the other hand, when you evaluate the the definition of dirent->name, no intermediate file is left behind.
Of course in both cases you make temporary C files, but they are ephemeral. The difference is that in the first case you are generating files for inclusion in a later phase, and in the second you are effectively extending your scheme compiler with a c compiler.
The surprising about this code from a Scheme programmer's POV is that usually macros are about rewriting Scheme source using Scheme. In this case the macro generates C source, forks to compile and run it, and munges the result into the resulting text.
But sure, I can see that from a certain point of view, autoconf and scheme macros can do similar things :)
- mfukar 16y agoI see your point, but the fact remains that the underlying technique is just the same. The difference on whether intermediate files are used further down the build process seems somewhat irrelevant.