summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--builddefs/message.mk2
2 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 48cf35248f..65b33105c4 100644
--- a/Makefile
+++ b/Makefile
@@ -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
20override SILENT := false 20override SILENT := false
21 21
22ifeq ($(shell git rev-parse --is-inside-work-tree 2>/dev/null),)
23 export SKIP_GIT := yes
24 export NOT_REPO := yes
25endif
26
22ifdef SKIP_VERSION 27ifdef SKIP_VERSION
23 SKIP_GIT := yes 28 export SKIP_GIT := yes
24endif 29endif
25 30
26ifndef SUB_IS_SILENT 31ifndef 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 402ifdef NOT_REPO
403 printf "$(MSG_NOT_REPO)"
404endif
398ifndef SKIP_GIT 405ifndef 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:
64MSG_CLEANING = Cleaning project: 64MSG_CLEANING = Cleaning project:
65MSG_CREATING_LIBRARY = Creating library: 65MSG_CREATING_LIBRARY = Creating library:
66MSG_GENERATING = Generating: 66MSG_GENERATING = Generating:
67MSG_NOT_REPO = $(WARN_COLOR)WARNING:$(NO_COLOR) Target folder is not a git repo, you probably downloaded a zip file instead of cloning.\n\
68Please consider following $(BOLD)https://docs.qmk.fm/\#/newbs_getting_started$(NO_COLOR).\n\n
67MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\ 69MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\
68Please consider running $(BOLD)qmk git-submodule$(NO_COLOR).\n\n 70Please consider running $(BOLD)qmk git-submodule$(NO_COLOR).\n\n
69MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) 71MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)