From 87d57583e5952de4bc197fab1183509d2bf6117a Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 17 Nov 2017 14:03:34 -0800 Subject: [PATCH] CI compile tools: refactor makefile --- tests/05-compile-tools/Makefile | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/05-compile-tools/Makefile b/tests/05-compile-tools/Makefile index 80155e601..43f84405a 100644 --- a/tests/05-compile-tools/Makefile +++ b/tests/05-compile-tools/Makefile @@ -25,25 +25,17 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -TOOLS=tools sky jn516x -TOOLSDIR=../../tools -TESTLOGS=$(patsubst %,%.testlog, $(TOOLS)) +TOOLS=tools tools/sky tools/jn516x +BASEDIR=../../ +TESTLOGS=$(subst /,__,$(patsubst %,%.testlog, $(TOOLS))) all: clean summary -tools.testlog: - @echo -n Building tool: $(basename $@) - @printf "%-32s" "$@" > $@ - @$(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 $@) clean > /dev/null && \ - $(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \ + @$(MAKE) -C $(BASEDIR)/$(basename $(subst __,/,$@)) clean > /dev/null && \ + $(MAKE) -C $(BASEDIR)/$(basename $(subst __,/,$@)) > /dev/null && \ (echo " -> OK" && echo "TEST OK" >> $@) || \ (echo " -> FAIL" && echo "TEST FAIL" >> $@)