diff options
author | Damien George <damien.p.george@gmail.com> | 2017-08-29 13:50:24 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-08-29 13:50:24 +1000 |
commit | 6568001c00112e14164a03ead6092491520a9b47 (patch) | |
tree | 2ae005a2ed8e659db6259c926506725dfcd1bcc9 | |
parent | 293e81f31e530488f42d3fb7cd296661a10e8908 (diff) |
stmhal/Makefile: Automatically fetch stm32lib submodule if needed.
-rw-r--r-- | stmhal/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index d404d9ccb..58a0a7c7a 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -345,7 +345,12 @@ $(PY_BUILD)/formatfloat.o: COPT += -Os $(PY_BUILD)/parsenum.o: COPT += -Os $(PY_BUILD)/mpprint.o: COPT += -Os -all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex +all: $(TOP)/lib/stm32lib/README.md $(BUILD)/firmware.dfu $(BUILD)/firmware.hex + +# For convenience, automatically fetch required submodules if they don't exist +$(TOP)/lib/stm32lib/README.md: + $(ECHO) "stm32lib submodule not found, fetching it now..." + (cd $(TOP) && git submodule update --init lib/stm32lib) ifneq ($(FROZEN_DIR),) # To use frozen source modules, put your .py files in a subdirectory (eg scripts/) |