1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: added a check for compiler existence

This commit is contained in:
Oleg Hahm 2015-02-21 13:59:41 +01:00
parent 42e251aad6
commit 984effd5b8

View File

@ -154,7 +154,7 @@ LINKFLAGPREFIX ?= -Wl,
DIRS += $(EXTERNAL_MODULE_DIRS)
## make script for your application. Build RIOT-base here!
all: ..build-message $(USEPKG:%=${BINDIR}%.a) $(APPDEPS)
all: ..compiler-check ..build-message $(USEPKG:%=${BINDIR}%.a) $(APPDEPS)
$(AD)DIRS="$(DIRS)" "$(MAKE)" -C $(CURDIR) -f $(RIOTBASE)/Makefile.application
ifeq (,$(RIOTNOLINK))
ifeq ($(BUILDOSXNATIVE),1)
@ -166,6 +166,12 @@ endif
$(AD)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
endif
..compiler-check:
$(AD)command -v $(CC) >/dev/null 2>&1 || \
{ $(COLOR_ECHO) \
'${COLOR_RED} Compiler $(CC) is required but not found in PATH. Aborting.${COLOR_RESET}'; \
exit 1; }
..build-message:
@$(COLOR_ECHO) '${COLOR_GREEN}Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".${COLOR_RESET}'
@$(COLOR_ECHO)