Why Learn Makefiles

Makefiles are the entry point to software projects

Published: Friday, Oct 7, 2022 Last modified: Friday, Apr 26, 2024

Why make?

Make is a software tool older than myself that new developers might over look, as being old and irrelevant.

The Makefile language requires tabs and that alone causes new users to abandon it.

There are some good reasons to know basic Make:

  1. It’s the entrypoint for thousands of software projects
  2. It’s fast
  3. make is present with any devel environment
  4. The Makefile describes the rules on how the software is built!

Tips to improving your Make experience

Use an $EDITOR that shows tabs:

set list listchars=nbsp:¬,tab:»·,trail:·,extends:>

Keep it simple! Targets should be files, if not PHONY to be pedantic

Ensure bash completion works:

[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion

Try https://github.com/tj/mmake

My own examples

Further argumentation on the need to automate your processes, using a similiar ./go concept, but pretend it says make instead, see: https://www.thoughtworks.com/en-sg/insights/blog/praise-go-script-part-i