aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-07-31 14:17:32 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-07-31 14:17:32 +0300
commita0dc6221993b10834dd55f58057d3354ca0910c3 (patch)
tree57112dabe06a965d07f0c96d5f7e471c33321d3e
parentd5a947b32495625970d220349ca8f47e4cb2992a (diff)
downloadqmk_firmware-a0dc6221993b10834dd55f58057d3354ca0910c3.tar.gz
qmk_firmware-a0dc6221993b10834dd55f58057d3354ca0910c3.zip
Remove the quick commands and add proper clean
-rw-r--r--tmk_core/rules.mk31
1 files changed, 5 insertions, 26 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 69f82dc83..d2350f27c 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -45,11 +45,6 @@ ifeq ($(COLOR),true)
45 BOLD=\033[1m 45 BOLD=\033[1m
46endif 46endif
47 47
48ifdef quick
49 QUICK = $(quick)
50endif
51
52QUICK ?= false
53AUTOGEN ?= false 48AUTOGEN ?= false
54 49
55ifneq ($(shell awk --version 2>/dev/null),) 50ifneq ($(shell awk --version 2>/dev/null),)
@@ -293,9 +288,6 @@ MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@)
293# Default target. 288# Default target.
294all: build sizeafter 289all: build sizeafter
295 290
296# Quick make that doesn't clean
297quick: build sizeafter
298
299# Change the build target to build a HEX file or a library. 291# Change the build target to build a HEX file or a library.
300build: elf hex 292build: elf hex
301#build: elf hex eep lss sym 293#build: elf hex eep lss sym
@@ -464,6 +456,9 @@ $(eval $(call GEN_OBJRULE,$(KBOBJDIR)))
464 456
465# Target: clean project. 457# Target: clean project.
466clean: 458clean:
459 $(REMOVE) -r $(OBJDIR) 2>/dev/null
460 $(REMOVE) -r $(KBOBJDIR) 2>/dev/null
461 $(REMOVE) $(BUILD_DIR)/$(TARGET).*
467 462
468show_path: 463show_path:
469 @echo VPATH=$(VPATH) 464 @echo VPATH=$(VPATH)
@@ -483,7 +478,6 @@ all-keyboards-defaults: all-keyboards-defaults-all
483 478
484KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%) 479KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%)
485all-keyboards-all: $(addsuffix -all,$(KEYBOARDS)) 480all-keyboards-all: $(addsuffix -all,$(KEYBOARDS))
486all-keyboards-quick: $(addsuffix -quick,$(KEYBOARDS))
487all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS)) 481all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS))
488all-keyboards: all-keyboards-all 482all-keyboards: all-keyboards-all
489 483
@@ -500,12 +494,10 @@ done
500endef 494endef
501 495
502define make_keyboard_helper 496define make_keyboard_helper
503# Just remove the -quick, -all and so on from the first argument and pass it forward 497# Just remove the -all and so on from the first argument and pass it forward
504$(call make_keyboard,$(subst -$2,,$1),$2) 498$(call make_keyboard,$(subst -$2,,$1),$2)
505endef 499endef
506 500
507/keyboards/%-quick:
508 $(call make_keyboard_helper,$@,quick)
509/keyboards/%-all: 501/keyboards/%-all:
510 $(call make_keyboard_helper,$@,all) 502 $(call make_keyboard_helper,$@,all)
511/keyboards/%-clean: 503/keyboards/%-clean:
@@ -523,19 +515,6 @@ all-keymaps-%:
523 515
524all-keymaps: all-keymaps-all 516all-keymaps: all-keymaps-all
525 517
526GOAL=$(MAKECMDGOALS)
527ifeq ($(MAKECMDGOALS),)
528GOAL = all
529endif
530CLEANING_GOALS=clean clean_list all
531ifneq ($(findstring $(GOAL),$(CLEANING_GOALS)),)
532$(shell $(REMOVE) -r $(BUILD_DIR) 2>/dev/null)
533$(shell $(REMOVE) -r $(TOP_DIR)/$(BUILD_DIR))
534$(shell $(REMOVE) -r $(KEYBOARD_PATH)/$(BUILD_DIR))
535$(shell if $$SUBPROJECT; then $(REMOVE) -r $(SUBPROJECT_PATH)/$(BUILD_DIR); fi)
536$(shell $(REMOVE) -r $(KEYMAP_PATH)/$(BUILD_DIR))
537endif
538
539# Create build directory 518# Create build directory
540$(shell mkdir $(BUILD_DIR) 2>/dev/null) 519$(shell mkdir $(BUILD_DIR) 2>/dev/null)
541 520
@@ -548,7 +527,7 @@ $(shell mkdir $(KBOBJDIR) 2>/dev/null)
548 527
549 528
550# Listing of phony targets. 529# Listing of phony targets.
551.PHONY : all quick finish sizebefore sizeafter gccversion \ 530.PHONY : all finish sizebefore sizeafter gccversion \
552build elf hex eep lss sym coff extcoff check_submodule \ 531build elf hex eep lss sym coff extcoff check_submodule \
553clean clean_list debug gdb-config show_path \ 532clean clean_list debug gdb-config show_path \
554program teensy dfu flip dfu-ee flip-ee dfu-start \ 533program teensy dfu flip dfu-ee flip-ee dfu-start \