News for hackers. Stuff that matters.
Re:C Preprocessor Hell by plorkyeran on Thursday January 12, 2012 @11:17AM (#3456813)
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.
Re:C Preprocessor Hell by anon_d on Thursday January 12, 2012 @11:23AM (#3456843)
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 <$^ >$@
Re:C Preprocessor Hell by BudVVeezer on Thursday January 12, 2012 @11:53AM (#3456980)
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.
Re:C Preprocessor Hell by ge0rg on Thursday January 12, 2012 @11:26AM (#3456860)
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.

Re:C Preprocessor Hell by anon_d on Thursday January 12, 2012 @12:16PM (#3457072)
None of that has to do with build system complexity.