summaryrefslogtreecommitdiffstats
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
authorfredizzimo <fsundvik@gmail.com>2016-07-02 03:57:59 +0200
committerJack Humbert <jack.humb@gmail.com>2016-07-02 03:57:59 +0200
commit1b319151aa8f4efb32a9146022d9de8c40eb5540 (patch)
tree7ee92ed49e98501029eb21db7be95dd9736e4d19 /tmk_core/rules.mk
parentc30aba0bce989d29458bd3b56090400cb0a91d03 (diff)
downloadqmk_firmware-1b319151aa8f4efb32a9146022d9de8c40eb5540.tar.gz
qmk_firmware-1b319151aa8f4efb32a9146022d9de8c40eb5540.tar.xz
Add warning when submodules are not updated (#469)
* Add warning when submodules are not updated * Sh compatible syntax for dirty submodule check
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 96eba24d6..7d3d8f9a6 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -16,7 +16,6 @@
#
-
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
@@ -243,6 +242,12 @@ MSG_COMPILING_CPP = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
MSG_CREATING_LIBRARY = Creating library:
+MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
+ Some git sub-modules are out of date or modified, please consider runnning:$(BOLD)\n\
+ git submodule sync --recursive\n\
+ git submodule update --init --recursive$(NO_COLOR)\n\n\
+ You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\
+ or if you have modified the ChibiOS libraries yourself. \n\n
# Define all object files.
@@ -304,6 +309,13 @@ lib: $(LIBNAME)
# the following magic strings to be generated by the compile job.
begin:
@$(SECHO) $(MSG_BEGIN)
+ git submodule status --recursive | \
+ while IFS= read -r x; do \
+ case "$$x" in \
+ \ *) ;; \
+ *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
+ esac \
+ done
end:
@$(SECHO) $(MSG_END)