Skip to content

Commit

Permalink
Merge pull request #710 from jonasdn/jonasdn/error-submodules
Browse files Browse the repository at this point in the history
Makefile: Error out on missing submodules
  • Loading branch information
jonasdn authored Mar 2, 2021
2 parents edeabc1 + c996bee commit 007e327
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,23 @@ ifeq ($(SHELL),/bin/sh)
COL_RESET=\033[m
endif

#################### Targets ###############################
# This define n-thing is a standard hack to get newlines in GNU Make.
define n


endef

# Make sure that the submodules are up to date.
# Check if there are any files in the vendor directories, if not warn the user.
ifeq ($(wildcard $(CRAZYFLIE_BASE)/vendor/*/*),)
$(error $n \
The submodules does not seem to be present, consider fetching them by:$n \
$$ git submodule init$n \
$$ git submodule update$n \
)
endif

#################### Targets ###############################

all: bin/ bin/dep bin/vendor check_submodules build
build:
Expand Down

0 comments on commit 007e327

Please sign in to comment.