Welcome back to sysadvent.org.

Each day until christmas a small nugget will be published here to easen up the waiting time until christmas.

Let’s start this year with this small nugget for your Makefiles:

assert-command-present = $(if $(shell which $1),,$(error '$1' missing and needed for this build))

$(call assert-command-present,curl)
$(call assert-command-present,curly)

When evaluating if a certian binary or command is available, this make function can it.

It will throw an error if the binary is not available and stays silent otherwise.