commit: c27d050f40099ebe2f65cf4e49687e96f0f79b77
parent 282bc6aa14b64ff1265409a46774875d6220d6ad
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 12 Mar 2022 02:31:56 +0100
{,bin/}Makefile: Clean coverage files on rebuilds
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Makefile.common b/Makefile.common
@@ -1,9 +1,11 @@
all: $(EXE)
.c:
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) -o $@ $< $(LDFLAGS)
.c.o:
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) -c -o $@ $<
.PHONY: coverage
diff --git a/bin/Makefile b/bin/Makefile
@@ -12,15 +12,19 @@ lint:
$(SHELLCHECK) $(SH_SCRIPTS)
lolcat: lolcat.c Makefile
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) -o $@ $< -lm $(LDFLAGS)
xcd: xcd.c Makefile
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) -o $@ $< -lm $(LDFLAGS)
humanize: humanize.c Makefile
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) $(LIBBSD_CFLAGS) -o $@ $< $(LIBBSD_LIBS) $(LDFLAGS)
strings: strings.c Makefile
+ rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno}
$(CC) -std=c99 $(CFLAGS) $(LIBBSD_CFLAGS) -o $@ $< $(LIBBSD_LIBS) $(LDFLAGS)