checkmake
checkmake copied to clipboard
Feature: Encourage stricter filename conventions
In order to more quickly distinguish between bmake and gmake files, we could create a new linter rule that warns on ambiguous files.
Basically, Makefile
is ambiguous. This can lead to both text editors and humans assuming the wrong syntax. Any Makefile
's can be disambiguated by adopting the fully lowercase makefile
(bmake) or else GNUmakefile
(gmake).
On second thought, there is value in encouraging the POSIX Makefile name. Projects that do not depend on extensions to the POSIX make standard, should follow the Makefile
name.
A rule to the effect of checkbashisms would be helpful. When GNU-isms or BSD-isms are present, recommend the relevant filename. Otherwise, recommend the generic Makefile
.
One thing to consider here is how some build systems will automatically generate Makefiles with the Makefile
name regardless of what sort of syntax they contain. It isn't really as easy to rename the files in such cases.