Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Unexpected end of line seen' in a Makefile

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

I have a package Makefile which gives me the following error while running the make command -

wpcms1 # /usr/ccs/bin/make
make: Fatal error in reader: Makefile, line 121: Unexpected end of line seen

By deleting the last line in the Makefile, all is fine.
I tried retyping this line many times without any success.

Any ideas?

Thanks,
Dan
 
After playing with it a bit it says:

wpcms1 # /usr/ccs/bin/make
mksh: Warning: newline is not last character in file Makefile

Any ideas?

Thanks,
Dan
 
Try inserting a carriage return using: ctrl-v ctrl-m

In the file it will appear as ^M
 
Here is the line which causes the issue (with the ^M):
./mkprotos.sh ^M

By running it with /usr/local/bin/make, I get

wpcms1 # /usr/local/bin/make
Makefile:91: *** missing separator. Stop.

When commenting the line all is fine.

-- Dan
 
It's working now – it seems that the makefile is very sensitive to the comment character (#) which is not in the right place, or when a tab is substituted by spaces.

-- Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top