From 3933fd30dfda7fbe2b06afd4d70a74b6e0f6fda2 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 13:32:47 -0800 Subject: [PATCH] CI: tool compilation: clean before building --- tests/05-compile-tools/Makefile | 6 ++++-- tools/Makefile | 2 ++ tools/sky/Makefile | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 504cbcf9f..b5217c7be 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -34,14 +34,16 @@ all: clean summary tools.testlog: @echo -n Building tool: $(basename $@) @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR) > /dev/null && \ + @$(MAKE) -C $(TOOLSDIR) clean > /dev/null && \ + $(MAKE) -C $(TOOLSDIR) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@) %.testlog: @echo -n Building tool: $(basename $@) @printf "%-32s" "$@" > $@ - @$(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ + @$(MAKE) -C $(TOOLSDIR)/$(basename $@) clean > /dev/null && \ + $(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@) diff --git a/tools/Makefile b/tools/Makefile index 297346665..9bd1f19b1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,6 +3,8 @@ all: tunslip6 CFLAGS += -Wall -Werror tunslip6: tools-utils.c tunslip6.c +clean: + rm -f *.o tunslip6 gitclean: @git clean -d -x -n .. diff --git a/tools/sky/Makefile b/tools/sky/Makefile index 334461c0a..2c4254a71 100644 --- a/tools/sky/Makefile +++ b/tools/sky/Makefile @@ -25,3 +25,6 @@ CFLAGS += -Wall -Werror $(SERIALDUMP): serialdump.c $(CC) -O2 -o $@ $< + +clean: + rm -f $(SERIALDUMP)