Reputation: 1507
Trying to install Git, I ran configure and make, but got the following error message:
make: Fatal error in reader: Makefile, line 221: Unexpected end of line seen
The Makefile looks like:
218: GIT-VERSION-FILE: FORCE
219: @$(SHELL_PATH) ./GIT-VERSION-GEN
220: -include GIT-VERSION-FILE
221:
222: uname_S := $(shell sh -c 'uname -s 2>/dev/null øø echo not')
What's causing the error?
The following information may or may not be relevant:
Upvotes: 12
Views: 18905
Reputation: 321
I came to this error with 2 simple makefiles, one of which was working, and one which produced the error.
Both had properly tabbed lines, and both had "CRLF" line endings.
For one reason or another, I managed to fix the problem by changing the line endings to "LF", but I am confused as to why the other makefile was parsed successfully even though it had "CRLF" endings. There is, however, a clue: the first one or two times, "make" gave another error:
mksh: Warning: newline is not last character...
After opening the makefile in a text-editor, and adding a line ending at the end, it started producing the OP's error.
In this situation, it's good to have an editor that can display line endings and tabs.
Upvotes: 1
Reputation: 13474
Use gmake
instead of make
.
Genrally solaris has two command, gmake
and make
. In this gmake
is GNU style make command, and make
is solaris style make command. I hope you have written your makefile in GNU style. So use gmake
command.
Upvotes: 6
Reputation: 1457
This might be due to DOS line endings (CRLF) in your makefile. I have just had a similar problem and solved it by running dos2unix on the makefile. Linux make seems unfazed by the same makefile.
Upvotes: 2
Reputation: 21
Make sure that you have actually tabbed the line and it is not all spaces. I had this issue but I found out the command was not properly tabbed in and that is why I was running into this error.
Upvotes: 1