[Top][All Lists]

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

Re: make failing, tabs are fine, missing separator

From: Russell King
Subject: Re: make failing, tabs are fine, missing separator
Date: Wed, 9 Jan 2008 19:32:26 -0500

Now I am getting this error:

address@hidden lama]$ make
(cd src;make)
make[1]: Entering directory `/home/russ/lama/src'
make[1]: *** No rule to make target `/', needed by `all'.  Stop.
make[1]: Leaving directory `/home/russ/lama/src'
make: *** [all] Error 2

I think the problem is right here at the line:


Does it mean I have to have a target $(ERL_OBJECTS) and/or command for
all: $(ERL_OBJECTS) ?


./src/Makefile contents:

include ../
#include ../../../support/
ERLC_FLAGS  += -I../include


    -rm $(ERL_OBJECTS)

On Jan 9, 2008 4:40 PM, Philip Guenther <address@hidden> wrote:
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]