help-make
[Top][All Lists]
Advanced

[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 `/lama.app', 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:

all: $(ERL_OBJECTS)

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

===================

./src/Makefile contents:

include ../vsn.mk
#include ../../../support/include.mk
ERLC_FLAGS  += -I../include
ERL_OBJECTS += $(EBIN_DIR)/lama.app

all: $(ERL_OBJECTS)

clean:
    -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/subdir.mk^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:

APP_NAME=lama
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]