summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-08 09:26:23 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-08-20 02:56:30 +0200
commit67b294ca66fd9da341ab93019a380d91ac589c96 (patch)
tree43ce564d34fc93154476ef777202b2e245fb7805 /Makefile
parentdb5c3b74fb6541879bfad9930d2a659b1d89cd83 (diff)
downloadqmk_firmware-67b294ca66fd9da341ab93019a380d91ac589c96.tar.gz
qmk_firmware-67b294ca66fd9da341ab93019a380d91ac589c96.tar.xz
Actual compilation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index e5becd7ad..fc6157209 100644
--- a/Makefile
+++ b/Makefile
@@ -228,17 +228,19 @@ define PARSE_KEYMAP
KB_SP := $(CURRENT_KB)/$$(CURRENT_SP)
endif
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
+ MAKE_VARS := KEYBOARD=$$(CURRENT_KB) SUBPROJECT=$$(CURRENT_SP) KEYMAP=$$(CURRENT_KM)
+ MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=false
COMMAND_$$(COMMAND) := \
- printf "Compiling $$(KB_SP) with $(BOLD)$$(CURRENT_KM)$(NO_COLOR)" | \
- $(AWK) '{ printf "%-118s", $$$$0;}'; \
- LOG=$$$$(echo "$$(MAKE) -c $(ROOT_DIR) -f build_keyboard.mk VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true" 2>&1) ; \
- if [ $$$$? -gt 0 ]; \
- then $$(PRINT_ERROR_PLAIN); \
- elif [ "$$$$LOG" != "" ] ; \
- then $$(PRINT_WARNING_PLAIN); \
- else \
- $$(PRINT_OK); \
- fi;
+ printf "Compiling $$(KB_SP) with $(BOLD)$$(CURRENT_KM)$(NO_COLOR)" | \
+ $(AWK) '{ printf "%-118s", $$$$0;}'; \
+ LOG=$$$$($$(MAKE) -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_VARS) 2>&1) ; \
+ if [ $$$$? -gt 0 ]; \
+ then $$(PRINT_ERROR_PLAIN); \
+ elif [ "$$$$LOG" != "" ] ; \
+ then $$(PRINT_WARNING_PLAIN); \
+ else \
+ $$(PRINT_OK); \
+ fi;
endef
define PARSE_ALL_KEYMAPS
@@ -258,9 +260,11 @@ SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
$(SUBPROJECTS): %: %-allkm
.PHONY: %
-%:
+%:
+ cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
$(eval $(call PARSE_RULE,$@))
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
+
.PHONY: all
all: all-keyboards