checkmake icon indicating copy to clipboard operation
checkmake copied to clipboard

Feature: Warn on missing task definitions

Open mcandre opened this issue 2 years ago • 2 comments

checkmake has some odd behavior regarding phony targets. It specifies several minimum phony targets, such as all, clean, and test. But it doesn't actually validate whether the tasks are defined.

(GNU) make doesn't appear to care about undefined tasks until very late, when the task is explicitly invoked.

A linter such as checkmake would be a natural place to insert a new rule, that validates that all tasks referenced in a makefile, are actually defined somewhere.

mcandre avatar Mar 21 '23 04:03 mcandre

@mcandre is your concern about rules/tasks referenced as depenencies of other rule like bar: foo or about explicit invocation such as $(MAKE) foo?

obnoxxx avatar Jul 29 '25 09:07 obnoxxx

The former. Wanna catch simple typos before build systems run.

This is tricky to implement accurately, see unmake's current lack of support for implicit rules.

mcandre avatar Jul 29 '25 17:07 mcandre