CI: tool compilation: clean before building

This commit is contained in:
Simon Duquennoy 2017-11-17 13:32:47 -08:00
parent cfb895923a
commit 3933fd30df
3 changed files with 9 additions and 2 deletions

View File

@ -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" >> $@)

View File

@ -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 ..

View File

@ -25,3 +25,6 @@ CFLAGS += -Wall -Werror
$(SERIALDUMP): serialdump.c
$(CC) -O2 -o $@ $<
clean:
rm -f $(SERIALDUMP)