diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-12-30 11:08:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-30 11:08:02 -0500 |
commit | f98062081bcd56934241bac36fac76503d32a537 (patch) | |
tree | 59b67ff9b3de9c7f00fec4b5efda380061725392 | |
parent | 460bf008f58320b05e62962204416ec2abd28a4f (diff) | |
parent | 1d1f2b4ee2447bee94552cad8288757e093d900b (diff) | |
download | qmk_firmware-f98062081bcd56934241bac36fac76503d32a537.tar.gz qmk_firmware-f98062081bcd56934241bac36fac76503d32a537.zip |
Merge pull request #976 from fredizzimo/fix_makefile_on_cygwin
Fix makefile on cygwin
-rw-r--r-- | Makefile | 21 |
1 files changed, 3 insertions, 18 deletions
@@ -473,7 +473,7 @@ if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; | |||
473 | endef | 473 | endef |
474 | define RUN_TEST | 474 | define RUN_TEST |
475 | +error_occured=0;\ | 475 | +error_occured=0;\ |
476 | $($(TEST)_COMMAND))\ | 476 | $($(TEST)_COMMAND)\ |
477 | if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; | 477 | if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; |
478 | 478 | ||
479 | endef | 479 | endef |
@@ -485,11 +485,11 @@ $(SUBPROJECTS): %: %-allkm | |||
485 | 485 | ||
486 | # Let's match everything, we handle all the rule parsing ourselves | 486 | # Let's match everything, we handle all the rule parsing ourselves |
487 | .PHONY: % | 487 | .PHONY: % |
488 | ifndef SKIP_GIT | ||
489 | %: | 488 | %: |
490 | # Check if we have the CMP tool installed | 489 | # Check if we have the CMP tool installed |
491 | cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; | 490 | cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; |
492 | # Check if the submodules are dirty, and display a warning if they are | 491 | # Check if the submodules are dirty, and display a warning if they are |
492 | ifndef SKIP_GIT | ||
493 | git submodule status --recursive 2>/dev/null | \ | 493 | git submodule status --recursive 2>/dev/null | \ |
494 | while IFS= read -r x; do \ | 494 | while IFS= read -r x; do \ |
495 | case "$$x" in \ | 495 | case "$$x" in \ |
@@ -497,6 +497,7 @@ ifndef SKIP_GIT | |||
497 | *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \ | 497 | *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \ |
498 | esac \ | 498 | esac \ |
499 | done | 499 | done |
500 | endif | ||
500 | rm -f $(ERROR_FILE) > /dev/null 2>&1 | 501 | rm -f $(ERROR_FILE) > /dev/null 2>&1 |
501 | $(eval $(call PARSE_RULE,$@)) | 502 | $(eval $(call PARSE_RULE,$@)) |
502 | $(eval $(call SET_SILENT_MODE)) | 503 | $(eval $(call SET_SILENT_MODE)) |
@@ -508,22 +509,6 @@ ifndef SKIP_GIT | |||
508 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; | 509 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; |
509 | $(foreach TEST,$(TESTS),$(RUN_TEST)) | 510 | $(foreach TEST,$(TESTS),$(RUN_TEST)) |
510 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; | 511 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; |
511 | else | ||
512 | %: | ||
513 | # Check if we have the CMP tool installed | ||
514 | cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; | ||
515 | rm -f $(ERROR_FILE) > /dev/null 2>&1 | ||
516 | $(eval $(call PARSE_RULE,$@)) | ||
517 | $(eval $(call SET_SILENT_MODE)) | ||
518 | # Run all the commands in the same shell, notice the + at the first line | ||
519 | # it has to be there to allow parallel execution of the submake | ||
520 | # This always tries to compile everything, even if error occurs in the middle | ||
521 | # But we return the error code at the end, to trigger travis failures | ||
522 | $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) | ||
523 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; | ||
524 | $(foreach TEST,$(TESTS),$(RUN_TEST)) | ||
525 | if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; | ||
526 | endif | ||
527 | 512 | ||
528 | # All should compile everything | 513 | # All should compile everything |
529 | .PHONY: all | 514 | .PHONY: all |