[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make failing, tabs are fine, missing separator

From: Philip Guenther
Subject: Re: make failing, tabs are fine, missing separator
Date: Wed, 9 Jan 2008 14:40:31 -0700

On Jan 9, 2008 2:04 PM, Russell King <address@hidden> wrote:
> Output of "cat -vet Makefile" looks something  like this:
> ./Makefile contents:
>  ^M^M$
> #include ../../support/^M^M$
> APP_NAME=lama^M^M$
> all:^M^I(cd src;$(MAKE))^M#; $(MAKE) -C src^M$

^M == ASCII CR (Carriage Return)

Well, the problem should be obvious now: you've been editing the
makefile with silly editors that think that lines end with CRLF or
just CR instead of just LF.  The result is all those stray CRs that
sometimes _look_ like they ended a line but that don't actually do so.
 IIRC, as far as GNU make is concerned, CR is just whitespace like a
normal space.  So, what you have is the same as:

all:<tab>(cd src; $(MAKE)) #; $(MAKE) -C src

I suggest doing the following for each Makefile involved to replace
each CR with a LF:

    tr \\15 \\12 < Makefile > temp_file
    mv temp_file Makefile

Then edit the files to be correctly formatted using an editor that
won't insert invisible garbage, and *don't* edit makefiles across file
shares mounted between UNIX and Windows.

Philip Guenther

reply via email to

[Prev in Thread] Current Thread [Next in Thread]