This error can raise in case of misformatted makefile (mix between spaces and tabulations, bad end-of-line characters) or when you invoke the makefile with too many targets which are not supported by the makefile.
Attach your makefile and the command line which invokes it. It would help to check the reason !