Make can not remove *.o file

Hi all

Do you know why can not remove *.o file ?  tab already before rm.

AIX : 5.3
gcc version 4.2.0

 make -f a01_markfile

-rw-rw----    1 moonhkt   adg             422 Mar 10 09:22
-rwxrw----    1 moonhkt   adg           52665 Mar 10 09:20 a01
-rw-rw----    1 moonhkt   adg             647 Mar 10 09:20 a01.o
-rw-rw----    1 moonhkt   adg             122 Mar 09 17:29 a01.c

 gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/
ld --enable-languages=c,c++,java --pref
ix=/opt/freeware --enable-threads --enable-version-specific-runtime-
libs --host=powerpc-ibm-aix5.3.0.0 --targe
t=powerpc-ibm-aix5.3.0.0 --build=powerpc-ibm-aix5.3.0.0 --disable-
Thread model: aix
gcc version 4.2.0

cat a01_markfile

# http://cslibrary.stanford.edu/107/UnixProgrammingTools.pdf
# 2010/03/10
CC = gcc
PROG = a01
SRCS = a01.c

## This incantation says that the object files
## have the same name as the .c files, but with .o
OBJS = $(SRCS:.c=.o)

## This is the first rule (the default)
## Build the program from the .o's
$(PROG) : $(OBJS)
        $(CC) $(OBJS) -o $(PROG)

## Remove all the compilation and debugging files
clean :
        rm -f $(OBJS)

3/10/2010 1:26:21 AM
comp.lang.c 30657 articles. 5 followers. spinoza1111 (3246) is leader. Post Follow

1 Replies

Similar Articles

[PageSpeed] 5

moonhkt <moonhkt@gmail.com> writes:
> Do you know why can not remove *.o file ?  tab already before rm.

Your question is about the "make" tool, not about the C language.

Try comp.unix.programmer.

(BTW, it worked for me, at least once I made sure to use tabs
rather than spaces in the makefile.)

Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
3/10/2010 1:44:22 AM