Repeating Ourselves Less with M4
Summary
The post demonstrates using m4 macros to shrink an OpenBSD httpd.conf by defining reusable blocks and macros, and shows step-by-step macro recipes (BLOCK, BLOCKLIST, HEADERS, TLS, ACME) to generate a modular server config. It also discusses a pitfall with macro argument parsing when commas appear, and a sed workaround to preserve commas; ends with a reflection on whether such approaches fit a given environment.