DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Repeating Ourselves Less with M4

Quality: 8/10 Relevance: 9/10

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.

🚀 Service construit par Johan Denoyer