A tale in 3 pictures. In which our hero wonders if he can and doesn't stop to ask if he should.

#c #programming

C preprocessor abuse

C preprocessor abuse. GitHub Gist: instantly share code, notes, and snippets.

Gist
@citizen428 some slight modifications, and you can use cpp -E + that to make a static site generator using the preprocessor.
@necrophcodr Funny you'd say that, because this (`clang -I. -P -E`) but in another context is how this little side quest started.

@citizen428 I mean it has simple uses too, like adding simple include statements in any file, or, as you've shown, macros.

I've used it to make a lockfile for my Containerfile, and I'd just build using cpp -E <file> | docker build -f- <...>