"commence before first target. Stop." error

In *.mak file I receive commands "commence before first target. Stop." I didn't change it before.

How to solve this problem?


Solution 1:

make (or NMAKE, or whatever flavour of make you are using) can be quite picky about the format of makefiles - check that you didn't actually edit the file in any way, e.g. changed line endings, spaces <-> tabs, etc.

Solution 2:

This means that there is a line which starts with a space, tab, or some other whitespace without having a target in front of it.

Solution 3:

if you have added a new line, Make sure you have added next line syntax in previous line. typically if "\" is missing in your previous line of changes, you will get this error.