diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-07-31 14:17:32 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-07-31 14:17:32 +0300 |
| commit | a0dc6221993b10834dd55f58057d3354ca0910c3 (patch) | |
| tree | 57112dabe06a965d07f0c96d5f7e471c33321d3e | |
| parent | d5a947b32495625970d220349ca8f47e4cb2992a (diff) | |
| download | qmk_firmware-a0dc6221993b10834dd55f58057d3354ca0910c3.tar.gz qmk_firmware-a0dc6221993b10834dd55f58057d3354ca0910c3.zip | |
Remove the quick commands and add proper clean
| -rw-r--r-- | tmk_core/rules.mk | 31 |
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 |
| 46 | endif | 46 | endif |
| 47 | 47 | ||
| 48 | ifdef quick | ||
| 49 | QUICK = $(quick) | ||
| 50 | endif | ||
| 51 | |||
| 52 | QUICK ?= false | ||
| 53 | AUTOGEN ?= false | 48 | AUTOGEN ?= false |
| 54 | 49 | ||
| 55 | ifneq ($(shell awk --version 2>/dev/null),) | 50 | ifneq ($(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. |
| 294 | all: build sizeafter | 289 | all: build sizeafter |
| 295 | 290 | ||
| 296 | # Quick make that doesn't clean | ||
| 297 | quick: 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. |
| 300 | build: elf hex | 292 | build: 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. |
| 466 | clean: | 458 | clean: |
| 459 | $(REMOVE) -r $(OBJDIR) 2>/dev/null | ||
| 460 | $(REMOVE) -r $(KBOBJDIR) 2>/dev/null | ||
| 461 | $(REMOVE) $(BUILD_DIR)/$(TARGET).* | ||
| 467 | 462 | ||
| 468 | show_path: | 463 | show_path: |
| 469 | @echo VPATH=$(VPATH) | 464 | @echo VPATH=$(VPATH) |
| @@ -483,7 +478,6 @@ all-keyboards-defaults: all-keyboards-defaults-all | |||
| 483 | 478 | ||
| 484 | KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%) | 479 | KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%) |
| 485 | all-keyboards-all: $(addsuffix -all,$(KEYBOARDS)) | 480 | all-keyboards-all: $(addsuffix -all,$(KEYBOARDS)) |
| 486 | all-keyboards-quick: $(addsuffix -quick,$(KEYBOARDS)) | ||
| 487 | all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS)) | 481 | all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS)) |
| 488 | all-keyboards: all-keyboards-all | 482 | all-keyboards: all-keyboards-all |
| 489 | 483 | ||
| @@ -500,12 +494,10 @@ done | |||
| 500 | endef | 494 | endef |
| 501 | 495 | ||
| 502 | define make_keyboard_helper | 496 | define 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) |
| 505 | endef | 499 | endef |
| 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 | ||
| 524 | all-keymaps: all-keymaps-all | 516 | all-keymaps: all-keymaps-all |
| 525 | 517 | ||
| 526 | GOAL=$(MAKECMDGOALS) | ||
| 527 | ifeq ($(MAKECMDGOALS),) | ||
| 528 | GOAL = all | ||
| 529 | endif | ||
| 530 | CLEANING_GOALS=clean clean_list all | ||
| 531 | ifneq ($(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)) | ||
| 537 | endif | ||
| 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 \ |
| 552 | build elf hex eep lss sym coff extcoff check_submodule \ | 531 | build elf hex eep lss sym coff extcoff check_submodule \ |
| 553 | clean clean_list debug gdb-config show_path \ | 532 | clean clean_list debug gdb-config show_path \ |
| 554 | program teensy dfu flip dfu-ee flip-ee dfu-start \ | 533 | program teensy dfu flip dfu-ee flip-ee dfu-start \ |
