Programming Utilities Guide

Null Rules

If a target entry contains no rule, make attempts to select an implicit rule to build it. If make cannot find an appropriate implicit rule and there is no SCCS history from which to retrieve it, make concludes that the target has no corresponding file, and regards the missing rule as a null rule.


Note -

You can use a dependency with a null rule to force the target rule to be executed. The conventional name for such is FORCE.


With this makefile:

haste: FORCE 
        echo "haste makes waste"
FORCE:

make performs the rule for making haste, even if a file by that name is up to date:

$ touch haste 
$ make haste 
echo "haste makes waste"
haste makes waste