m****x 发帖数: 6 | 1 /bow first
This is a stupid simple question.
Why I cannot get "clean" functioning in make?
eg. This is my makefile:
prog: prog.o aid.o
gcc -o prog.o aid.o
prog.o: prog.c
gcc -c prog.c
aid.o: aid.c
gcc -c aid.c
clean:
rm *.o
everything is fine, except that "clean" task does not take place. Why?
/bow again |
s*****d 发帖数: 258 | 2 could it be a "tab" problem? I mean you mistakenly entered spaces instead of
a "tab" before "rm" .
br />
【在 m****x 的大作中提到】 : /bow first : This is a stupid simple question. : Why I cannot get "clean" functioning in make? : eg. This is my makefile: : prog: prog.o aid.o : gcc -o prog.o aid.o : prog.o: prog.c : gcc -c prog.c : aid.o: aid.c : gcc -c aid.c
|
m****x 发帖数: 6 | 3 No. I have a tab there.
【在 s*****d 的大作中提到】 : could it be a "tab" problem? I mean you mistakenly entered spaces instead of : a "tab" before "rm" . : br />
|
m*******m 发帖数: 182 | 4 Remove the empty line after "clean" target.
~{!>~} ~{TZ~} matrix (nxm matrix) ~{5D4sWwVPLa5=~}: ~{!?~} |
c*****t 发帖数: 1879 | 5 You should be more careful:
^^^^^^^^^^^^^^^^^^^
gcc -o prog prog.o aid.o
【在 m****x 的大作中提到】 : /bow first : This is a stupid simple question. : Why I cannot get "clean" functioning in make? : eg. This is my makefile: : prog: prog.o aid.o : gcc -o prog.o aid.o : prog.o: prog.c : gcc -c prog.c : aid.o: aid.c : gcc -c aid.c
|