Makefile: Remove coverage files on 'make clean'

This patch updates a variety of Makefiles in Asterisk's build system to
remove .gcda and .gcno files when 'make clean' is executed. These files
are generated when '--enable-coverage' is passed to the Asterisk
configure script.

Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602
This commit is contained in:
Matt Jordan 2015-06-27 18:47:19 -05:00
parent fa4dd9755a
commit 2c17515f3c
3 changed files with 4 additions and 4 deletions

View File

@ -81,8 +81,8 @@ clean-$(1)$(3):
endef
MOD_ADD_C=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.c,.i,.o))
MOD_ADD_CC=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.cc,.ii,.oo))
MOD_ADD_C=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.c,.i,.o,.gcda,.gcno))
MOD_ADD_CC=$(eval $(call MOD_ADD_SOURCE,$(1),$(2),.cc,.ii,.oo,.gcda,.gcno))
$(addsuffix .oo,$(CC_MODS)) $(addsuffix .o,$(C_MODS)): \
_ASTCFLAGS+=$(call MOD_ASTCFLAGS,$*)
@ -140,6 +140,7 @@ clean::
rm -f *.so *.o *.oo *.eo *.i *.ii
rm -f .*.d
rm -f *.s *.i
rm -f *.gcda *.gcno
rm -f modules.link
install:: all

View File

@ -23,7 +23,6 @@ ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_monitor.so
endif
$(call MOD_ADD_C,chan_iax2,$(wildcard iax2/*.c))
$(call MOD_ADD_C,chan_sip,$(wildcard sip/*.c))
$(call MOD_ADD_C,chan_pjsip,$(wildcard pjsip/*.c))

View File

@ -14,4 +14,4 @@ portinfo: portinfo.o
$(CC) -o $@ $^ -lisdnnet -lmISDN -lpthread
clean:
rm -rf *.a *.o *.so portinfo *.i
rm -rf *.a *.o *.so portinfo *.i *.gcda *.gcno