|
|
|
@ -1,3 +1,25 @@
|
|
|
|
|
ifneq (, $(filter buildtest, $(MAKECMDGOALS))) |
|
|
|
|
ifeq (, $(strip $(NPROC)))
|
|
|
|
|
# Linux (utility program)
|
|
|
|
|
NPROC := $(shell nproc 2>/dev/null)
|
|
|
|
|
|
|
|
|
|
ifeq (, $(strip $(NPROC)))
|
|
|
|
|
# Linux (generic)
|
|
|
|
|
NPROC := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
|
|
|
|
|
endif
|
|
|
|
|
ifeq (, $(strip $(NPROC)))
|
|
|
|
|
# BSD (at least FreeBSD and Mac OSX)
|
|
|
|
|
NPROC := $(shell sysctl -n hw.ncpu 2>/dev/null)
|
|
|
|
|
endif
|
|
|
|
|
ifeq (, $(strip $(NPROC)))
|
|
|
|
|
# Fallback
|
|
|
|
|
NPROC := 1
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
NPROC := $(shell echo $$(($(NPROC) + 1)))
|
|
|
|
|
endif
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
buildtest: |
|
|
|
|
@if [ -z "$${JENKINS_URL}" ] && tput colors 2>&1 > /dev/null; then \
|
|
|
|
|
GREEN='\033[1;32m'; RED='\033[1;31m'; RESET='\033[0m'; \
|
|
|
|
@ -29,7 +51,7 @@ buildtest:
|
|
|
|
|
RIOTBOARD=$${RIOTBOARD} \
|
|
|
|
|
RIOTCPU=$${RIOTCPU} \
|
|
|
|
|
BINDIRBASE=$${BINDIRBASE} \
|
|
|
|
|
$(MAKE) 2>&1 >/dev/null) ; \
|
|
|
|
|
$(MAKE) -j$(NPROC) 2>&1 >/dev/null) ; \
|
|
|
|
|
if [ "$${?}" = "0" ]; then \
|
|
|
|
|
$${ECHO} "$${GREEN}success$${RESET}"; \
|
|
|
|
|
else \
|
|
|
|
|