Unix Programming - Makefile error?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2005 > Makefile error?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Makefile error?
Fernando Barsoba

2005-08-18, 5:54 pm

Hi there,

Silly situation keeps me from continuing w/ my tests... I'm trying to
execute the following makefile in a Linux machine:

*********************************
all:
listen speak

listen: listen.o
gcc -g listen.c -o listen

speak: speak.o
gcc -g speak.c -o speak

clean:
\rm -f listen speak

squeaky:
make clean
\rm -f listen.o speak.o

#tar:
# cd ..; tar czvf socket.tar.gz socket/Makefile socket/listen.c
socket/speak.c socket/README; cd socket; mv ../socket.tar.gz .
*********************************

But for some reason, I get this error:
***************
eos% ./Makefile
../Makefile: line 1: all:: command not found
../Makefile: line 2: listen: command not found
../Makefile: line 4: listen:: command not found
../Makefile: line 7: speak:: command not found
../Makefile: line 10: clean:: command not found
../Makefile: line 13: squeaky:: command not found
***************

any idea what is this about?

Thank you very much,

Fernando
Torgny Lyon

2005-08-18, 5:54 pm

Fernando Barsoba <fbarsoba@verizon.net> wrote:
> eos% ./Makefile


How about running make?

--
Torgny Lyon
Fernando Barsoba

2005-08-18, 5:54 pm

Fernando Barsoba wrote:
> Hi there,
>
> Silly situation keeps me from continuing w/ my tests... I'm trying to
> execute the following makefile in a Linux machine:
>
> *********************************
> all:
> listen speak
>
> listen: listen.o
> gcc -g listen.c -o listen
>
> speak: speak.o
> gcc -g speak.c -o speak
>
> clean:
> \rm -f listen speak
>
> squeaky:
> make clean
> \rm -f listen.o speak.o
>
> #tar:
> # cd ..; tar czvf socket.tar.gz socket/Makefile socket/listen.c
> socket/speak.c socket/README; cd socket; mv ../socket.tar.gz .
> *********************************
>
> But for some reason, I get this error:
> ***************
> eos% ./Makefile
> ./Makefile: line 1: all:: command not found
> ./Makefile: line 2: listen: command not found
> ./Makefile: line 4: listen:: command not found
> ./Makefile: line 7: speak:: command not found
> ./Makefile: line 10: clean:: command not found
> ./Makefile: line 13: squeaky:: command not found
> ***************
>
> any idea what is this about?
>
> Thank you very much,
>
> Fernando


Ok, i realized what my mistake was... you should call makefile with the
make command... :-(

thanks anyway..
Fernando Barsoba

2005-08-18, 5:54 pm

Torgny Lyon wrote:
> Fernando Barsoba <fbarsoba@verizon.net> wrote:
>
>
>
> How about running make?
>

Thanks! I just saw it...
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com