Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 55105

Summary: ^M must be visible to detect/correct bad Makefiles
Product: [Eclipse Project] Platform Reporter: Brent Nicolle <bnicolle>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   
Whiteboard:

Description Brent Nicolle CLA 2004-03-17 10:38:17 EST
On Solaris,
using Eclipse/WSWB I-20040304 (with CDT bits 2.0.0.200403040925)

I'm trying to import a project that I downloaded or extracted
from a Windows-based server.

Although Eclipse and most compilers accept input that has ^M
most versions of Make are less tolerant.

1. Create a file named "makefile" with carriage returns (^M) in it.
One easy way to do this is to create it in Windows Notepad.exe,
then move the file to a Unix place (remove the .txt extension).
Consider content like:
OBJS = hello \
       world
all :
    echo $(OBJS)
2. From Unix, run "make".  Gnu Make 3.71 produces the following message,
which is fairly helpful:
makefile:2: *** commands commence before first target.  Stop.
3. Open with "vi"; note the obvious presence of ^M on every line
4. Open with emacs; note the obvious presence of ^M (or that the buffer
is in "Dos-mode" depending on your emacs)
5. Open the file in Eclipse (by adding it to a CDT Standard Make project).
If you try to build, you'll still end up with the message in step 2.
Open the Makefile and you have no idea what is wrong with it.

EXPECTED: At least be able to see the problem that Make sees.
I could not find a way for Eclipse to show me the ^M's in the editor.

AS A BONUS: Provide a way to fix the problem (eg. "Save in Unix mode")
Comment 1 Brent Nicolle CLA 2004-03-17 10:40:09 EST
Not a CDT bug. Moving to Eclipse/Platform.
Comment 2 Dani Megert CLA 2004-03-19 04:07:50 EST

*** This bug has been marked as a duplicate of 22712 ***