Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abort the build-process when the build-configuration is unsupported #866

Merged
merged 1 commit into from
Feb 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
VALGRIND_FREYA := OFF
endif

# Indicate when Valgrind or Valgrind_Freya option is enabled.
VALGRIND_IS_ENABLED ?= OFF

ifneq ($(VALGRIND)$(VALGRIND_FREYA), OFFOFF)
VALGRIND_IS_ENABLED := ON
else
VALGRIND_IS_ENABLED := OFF
endif

# Static checkers
STATIC_CHECK ?= OFF

Expand Down Expand Up @@ -213,13 +222,15 @@ $(BUILD_DIRS_NATIVE):

.PHONY: $(BUILD_DIRS_STM32F3)
$(BUILD_DIRS_STM32F3): prerequisites
$(Q) [ "$(VALGRIND_IS_ENABLED)" = "OFF" ] || (echo "Build failed. This target doesn't support build with Valgrind."; exit 1;)
$(Q) mkdir -p $@
$(Q) cd $@ && \
(cmake -DENABLE_VALGRIND=$(VALGRIND) -DENABLE_VALGRIND_FREYA=$(VALGRIND_FREYA) -DENABLE_LTO=$(LTO) -DENABLE_ALL_IN_ONE=$(ALL_IN_ONE) -DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_mcu_stm32f3.cmake ../../.. 2>&1 | tee cmake.log $(QLOG) ; ( exit $${PIPESTATUS[0]} ) ) || \
(echo "CMake run failed. See "`pwd`"/cmake.log for details."; exit 1;)

.PHONY: $(BUILD_DIRS_STM32F4)
$(BUILD_DIRS_STM32F4): prerequisites
$(Q) [ "$(VALGRIND_IS_ENABLED)" = "OFF" ] || (echo "Build failed. This target doesn't support build with Valgrind."; exit 1;)
$(Q) mkdir -p $@
$(Q) cd $@ && \
(cmake -DENABLE_VALGRIND=$(VALGRIND) -DENABLE_VALGRIND_FREYA=$(VALGRIND_FREYA) -DENABLE_LTO=$(LTO) -DENABLE_ALL_IN_ONE=$(ALL_IN_ONE) -DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_mcu_stm32f4.cmake ../../.. 2>&1 | tee cmake.log $(QLOG) ; ( exit $${PIPESTATUS[0]} ) ) || \
Expand Down