There should be tabs ONLY on the command lines, not on the lines that
define the dependency relationships. For example,
all: myprogram [This line has no leading TAB]
myprogram: io.o init.o compute.o
gcc -o myprogram io.o init.o compute.o [This line has a TAB]
compute.o: compute.c
gcc -Wall -c -o compute.o compute.c [This line has a TAB]
...
... etc
...
Jim Cunning
On Fri, 29 Dec 2000, Huiyuan Ma wrote:
> Hi,I made this simple Makefile:
>
> all: myprogram
>
> myprogram: io.o init.o compute.o
> gcc -o myprogram io.o init.o compute.o
> compute.o: compute.c
> gcc -Wall -c -o compute.o compute.c
> init.o:init.c myprogram.h
> gcc -Wall -c -o init.o init.c
> io.o:io.c myprogram.h
> gcc -Wall -c -o io.o io.c
>
> But when i run with 'Make', was told 'commands
> commence before the first target.Stop.' Why? I applied
> the Tab key for each line, and all the source codes
> are there. Thanks.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list