On Jan 9, 2008 2:04 PM, Russell King <[EMAIL PROTECTED]> 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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to