From 67b294ca66fd9da341ab93019a380d91ac589c96 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 8 Aug 2016 10:26:23 +0300 Subject: Actual compilation --- Makefile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e5becd7ad7..fc61572094 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 -- cgit v1.2.3