On Makefiles

Ted Dziuba wrote a fantastic post (on his old blog, archived here) on the merits of make.

Go and take a look if you like; specifically, Makefile.

92 lines of Makefile reliably does the following, if and only if it’s necessary:

  • Download and install the various tools needed
  • Build a custom icon font
  • Pull down the latest bits of CSS that power the blog
  • Regenerate the various content pages
  • Combine and compress the CSS
  • Compact the HTML
  • Pre-gzip everything - NFSN doesn’t support on-the-fly compression.
  • Publish it

Which means I can…

  1. Write a new post
  2. make publish
  3. Done.

Admittedly my Makefile-fu is weak - but still, workflow control and optimization saves massive amounts of time. This is different from workflow pre-optimization, also known as process bloat, also known as the root of all evil. Get it to work and then refine it. The commits on that file tell a story - and should tell a story.

comments powered by Disqus