diff options
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | builddefs/message.mk | 2 |
2 files changed, 12 insertions, 2 deletions
| @@ -19,8 +19,13 @@ endif | |||
| 19 | # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly | 19 | # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly |
| 20 | override SILENT := false | 20 | override SILENT := false |
| 21 | 21 | ||
| 22 | ifeq ($(shell git rev-parse --is-inside-work-tree 2>/dev/null),) | ||
| 23 | export SKIP_GIT := yes | ||
| 24 | export NOT_REPO := yes | ||
| 25 | endif | ||
| 26 | |||
| 22 | ifdef SKIP_VERSION | 27 | ifdef SKIP_VERSION |
| 23 | SKIP_GIT := yes | 28 | export SKIP_GIT := yes |
| 24 | endif | 29 | endif |
| 25 | 30 | ||
| 26 | ifndef SUB_IS_SILENT | 31 | ifndef SUB_IS_SILENT |
| @@ -394,8 +399,11 @@ endef | |||
| 394 | cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; | 399 | cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; |
| 395 | # Ensure that $(QMK_BIN) works. | 400 | # Ensure that $(QMK_BIN) works. |
| 396 | if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi | 401 | if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi |
| 397 | # Check if the submodules are dirty, and display a warning if they are | 402 | ifdef NOT_REPO |
| 403 | printf "$(MSG_NOT_REPO)" | ||
| 404 | endif | ||
| 398 | ifndef SKIP_GIT | 405 | ifndef SKIP_GIT |
| 406 | # Check if the submodules are dirty, and display a warning if they are | ||
| 399 | if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi | 407 | if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi |
| 400 | if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi | 408 | if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi |
| 401 | if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi | 409 | if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi |
diff --git a/builddefs/message.mk b/builddefs/message.mk index 2bd01669f8..34a5e7da91 100644 --- a/builddefs/message.mk +++ b/builddefs/message.mk | |||
| @@ -64,6 +64,8 @@ MSG_ASSEMBLING = Assembling: | |||
| 64 | MSG_CLEANING = Cleaning project: | 64 | MSG_CLEANING = Cleaning project: |
| 65 | MSG_CREATING_LIBRARY = Creating library: | 65 | MSG_CREATING_LIBRARY = Creating library: |
| 66 | MSG_GENERATING = Generating: | 66 | MSG_GENERATING = Generating: |
| 67 | MSG_NOT_REPO = $(WARN_COLOR)WARNING:$(NO_COLOR) Target folder is not a git repo, you probably downloaded a zip file instead of cloning.\n\ | ||
| 68 | Please consider following $(BOLD)https://docs.qmk.fm/\#/newbs_getting_started$(NO_COLOR).\n\n | ||
| 67 | MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\ | 69 | MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\ |
| 68 | Please consider running $(BOLD)qmk git-submodule$(NO_COLOR).\n\n | 70 | Please consider running $(BOLD)qmk git-submodule$(NO_COLOR).\n\n |
| 69 | MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) | 71 | MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) |
