Add warning when submodules are not updated (#469)
* Add warning when submodules are not updated * Sh compatible syntax for dirty submodule checkmaster
parent
c30aba0bce
commit
1b319151aa
|
@ -16,7 +16,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Output format. (can be srec, ihex, binary)
|
# Output format. (can be srec, ihex, binary)
|
||||||
FORMAT = ihex
|
FORMAT = ihex
|
||||||
|
|
||||||
|
@ -243,6 +242,12 @@ MSG_COMPILING_CPP = Compiling:
|
||||||
MSG_ASSEMBLING = Assembling:
|
MSG_ASSEMBLING = Assembling:
|
||||||
MSG_CLEANING = Cleaning project:
|
MSG_CLEANING = Cleaning project:
|
||||||
MSG_CREATING_LIBRARY = Creating library:
|
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.
|
# Define all object files.
|
||||||
|
@ -304,6 +309,13 @@ lib: $(LIBNAME)
|
||||||
# the following magic strings to be generated by the compile job.
|
# the following magic strings to be generated by the compile job.
|
||||||
begin:
|
begin:
|
||||||
@$(SECHO) $(MSG_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:
|
end:
|
||||||
@$(SECHO) $(MSG_END)
|
@$(SECHO) $(MSG_END)
|
||||||
|
|
Loading…
Reference in New Issue