Quote:
Originally Posted by knudfl
'rm --help' will show you the options.
(I think that 'rm -f *.o' will do the job.)
|
I got the desired result by doing this ---------->
clean:
ifeq ($(findstring text11.o,$(wildcard *.o)), )
echo "no file named text11"
else
rm text11.o
endif
ifeq ($(findstring functext.o, $(wildcard *.o)), )
echo "no file named functext"
else
rm functext.o
endif
ifeq ($(findstring result.o, $(wildcard *.o)), )
echo "no file named result"
else
rm result.o
endif
#####################
But i am getting the result when
rm filename is in else part but if i compare the $(findstring text11.o,$(wildcard *.o)) function with text11.o
like:
ifeq ($(findstring text11.o,$(wildcard *.o)), text11.o)
and put rm text11.o in true part not in else part.
it is always giving empty string if the file text11.o is present there or not or in other words it is always executing else part.
so what is the reason ?