phony-declared
What it does
Section titled “What it does”Reports a target with no recipe that is not declared .PHONY. Targets that start with a . are special and are not reported.
Why it matters
Section titled “Why it matters”A target without a recipe that is not a file only groups other targets. If a file of that name appears, make stops running it, so the behaviour of the Makefile depends on what is in the directory.
To fix, add the target to .PHONY.
Example
Section titled “Example”...build: echo.DEFAULT: ;empty: allboth one two:$(OBJS): ;Configuration
Section titled “Configuration”makefile: lint: rules: phony-declared: warn # off (default), warn, errorEnabled by the presets: makefile/checkmake.
Suppress one line with sudsy-disable-next-line phony-declared in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| checkmake | phonydeclared |
full |