Hacker News new | ask | show | jobs
by plorkyeran 5271 days ago
Using external programs to generate code nontrivially increases the required complexity of your build system, and unless you're targeting Linux only, it isn't really given that users will already have perl installed, much less a lisp interpreter.
1 comments

nontrivially increases the required complexity of your build system.

No it doesn't. It only requires a single rule in your Makefile. Something like:

    %.c: %.cpre preprocess.pl; ./preprocess.pl <$^ >$@
Which works great if you use makefiles, but for those using Visual Studio for build management, it can be a bit more tricky. First you have to make sure you have perl, then you have to make sure you've got the appropriate build rules in place, then you have to make sure things get built at the right time, etc. It really is nontrivial.
As was already stated: it isn't really given that users will already have perl installed.

The usual workaround for such situations is to add the preprocessed files into source control as well, so they are available when a user is building the code. However, this ends up even more ugly.

None of that has to do with build system complexity.