checkmake is an experimental tool for linting and checking Makefiles. It may not do what you want it to.
% checkmake Makefile
% checkmake --help
checkmake.
Usage:
checkmake [--debug|--config=<configPath>] <makefile>
checkmake -h | --help
checkmake --version
Options:
-h --help Show this screen.
--version Show version.
--debug Enable debug mode
--config=<configPath> Configuration file to read
--list-rules List registered rules
% checkmake fixtures/missing_phony.make
RULE DESCRIPTION LINE NUMBER
minphony Missing required phony target 0
"all"
minphony Missing required phony target 0
"test"
phonydeclared Target "all" should be 18
declared PHONY.
There are packages for linux up on packagecloud.io but you can also just clone the repo and build the binary and man page yourself.
go get github.com/mrtazz/checkmake
cd $GOPATH/src/github.com/mrtazz/checkmake
make
This is totally inspired by an idea by Dan Buch.