make: Nothing to be done for `default'.

While writing make files to compile kernel modules we might come across the error

The common cause for the error is lack of tab space before the command.
A make rule always has three parts a target,prerequisite and the command to generate the target from the prerequisite.

For make to be able to differentiate between a command and a target, the command always needs to be prefixed with one tab space. In case we fail to do so then make will not recognize it as a command and throw an error saying that there is no command specified for the target. It is the same error as given above where default is the target.

Thus to solve the problem just open the makefile and add a tabspace before the command for whichever target the error is being thrown.

No comments:

Post a Comment

Follow by Email