From 3d67706411e76585580b194f4141c0a1c087c28b Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Fri, 19 Apr 2013 19:24:03 -0700 Subject: [PATCH] Added a check if libopencm3 submodule got cloned. --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 612504b..af3ace9 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,16 @@ all: build build: lib examples lib: + $(Q)if [ ! "`ls -A libopencm3`" ] ; then \ + echo "######## ERROR ########"; \ + echo "\tlibopencm3 is not initialized."; \ + echo "\tPlease run:"; \ + echo "\t$$ git submodule init"; \ + echo "\t$$ git submodule update"; \ + echo "\tbefore running make."; \ + echo "######## ERROR ########"; \ + exit 1; \ + fi $(Q)$(MAKE) -C libopencm3 EXAMPLE_DIRS:=$(sort $(dir $(wildcard $(addsuffix /*/*/Makefile,$(addprefix examples/,$(TARGETS))))))