forked from mirrors/qmk_firmware
Add quick version of the all-* makefile targets (#417)
This commit is contained in:
parent
db32864ce7
commit
3f6fac4721
2 changed files with 16 additions and 7 deletions
|
@ -67,6 +67,7 @@ Below is a list of the useful `make` commands in QMK:
|
||||||
* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
|
* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
|
||||||
* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
|
* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
|
||||||
* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
|
* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
|
||||||
|
* `make all-keyboards-quick`, `make all-keyboards-default-quick` and `make all-keymaps-quick [keyboard=<keyboard>]` - like the normal "make-all-*" commands, but they skip the clean steps
|
||||||
|
|
||||||
Other, less useful functionality:
|
Other, less useful functionality:
|
||||||
|
|
||||||
|
|
|
@ -661,29 +661,36 @@ show_path:
|
||||||
@echo SRC=$(SRC)
|
@echo SRC=$(SRC)
|
||||||
|
|
||||||
SUBDIRS := $(sort $(dir $(wildcard $(TOP_DIR)/keyboard/*/.)))
|
SUBDIRS := $(sort $(dir $(wildcard $(TOP_DIR)/keyboard/*/.)))
|
||||||
all-keyboards-defaults:
|
all-keyboards-defaults-%:
|
||||||
@for x in $(SUBDIRS) ; do \
|
@for x in $(SUBDIRS) ; do \
|
||||||
printf "Compiling with default: $$x" | $(AWK_CMD); \
|
printf "Compiling with default: $$x" | $(AWK_CMD); \
|
||||||
LOG=$$($(MAKE) -C $$x 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; \
|
LOG=$$($(MAKE) -C $$x $(subst all-keyboards-defaults-,,$@) 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; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
all-keyboards-defaults: all-keyboards-defaults-all
|
||||||
|
|
||||||
KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboard/%/=/keyboard/%)
|
KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboard/%/=/keyboard/%)
|
||||||
all-keyboards: $(KEYBOARDS)
|
all-keyboards-%: $(KEYBOARDS)
|
||||||
/keyboard/%:
|
/keyboard/%:
|
||||||
$(eval KEYBOARD=$(patsubst /keyboard/%,%,$@))
|
$(eval KEYBOARD=$(patsubst /keyboard/%,%,$@))
|
||||||
$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)$@/keymaps/*/.))))
|
$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)$@/keymaps/*/.))))
|
||||||
@for x in $(KEYMAPS) ; do \
|
@for x in $(KEYMAPS) ; do \
|
||||||
printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
|
printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
|
||||||
LOG=$$($(MAKE) -C $(TOP_DIR)$@ keymap=$$x 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; \
|
LOG=$$($(MAKE) -C $(TOP_DIR)$@ $(subst all-keyboards-,,$@) keymap=$$x 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; \
|
||||||
done
|
done
|
||||||
|
|
||||||
all-keymaps:
|
all-keyboards: all-keyboards-all
|
||||||
|
|
||||||
|
all-keymaps-%:
|
||||||
|
$(eval MAKECONFIG=$(call get_target,all-keymaps,$@))
|
||||||
$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboard/$(KEYBOARD)/keymaps/*/.))))
|
$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboard/$(KEYBOARD)/keymaps/*/.))))
|
||||||
@for x in $(KEYMAPS) ; do \
|
@for x in $(KEYMAPS) ; do \
|
||||||
printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
|
printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
|
||||||
LOG=$$($(MAKE) keyboard=$(KEYBOARD) keymap=$$x 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; \
|
LOG=$$($(MAKE) $(subst all-keymaps-,,$@) keyboard=$(KEYBOARD) keymap=$$x 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; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
all-keymaps: all-keymaps-all
|
||||||
|
|
||||||
# Create build directory
|
# Create build directory
|
||||||
$(shell mkdir $(BUILD_DIR) 2>/dev/null)
|
$(shell mkdir $(BUILD_DIR) 2>/dev/null)
|
||||||
|
|
||||||
|
@ -700,4 +707,5 @@ $(shell mkdir $(OBJDIR) 2>/dev/null)
|
||||||
build elf hex eep lss sym coff extcoff \
|
build elf hex eep lss sym coff extcoff \
|
||||||
clean clean_list debug gdb-config show_path \
|
clean clean_list debug gdb-config show_path \
|
||||||
program teensy dfu flip dfu-ee flip-ee dfu-start \
|
program teensy dfu flip dfu-ee flip-ee dfu-start \
|
||||||
all-keyboards-defaults all-keyboards all-keymaps
|
all-keyboards-defaults all-keyboards all-keymaps \
|
||||||
|
all-keyboards-defaults-% all-keyboards-% all-keymaps-%
|
||||||
|
|
Loading…
Reference in a new issue