Auto-initialize optional submodules when needed

This commit is contained in:
2024-09-27 18:06:42 +02:00
parent ae329083db
commit dec3d53c59
5 changed files with 24 additions and 16 deletions

View File

@@ -22,6 +22,7 @@ OBJCOPY := avr-objcopy
AVD := avrdude AVD := avrdude
MKDIR := mkdir -p MKDIR := mkdir -p
RMR := rm -rf RMR := rm -rf
GIT := git
SRCDIR := src SRCDIR := src
BINDIR := bin BINDIR := bin
@@ -79,19 +80,24 @@ distclean: clean
$(Q) $(RMR) $(BINDIR) $(Q) $(RMR) $(BINDIR)
.PHONY: listen .PHONY: listen
listen: ./opt/tools/serial-listen.py listen: opt/tools/serial-listen
$(E) "[PY3] $<" $(E) "[RUN] $<"
$(Q) ./$< $(Q) ./$<
.PHONY: webgui .PHONY: webgui
webgui: ./opt/webgui/Makefile webgui: opt/webgui/Makefile
$(E) "[MAK] $(<D)" $(E) "[MAK] $<"
$(Q) $(MAKE) -sC $(<D) $(Q) $(MAKE) -sC $(<D)
$(TMPDIRS): $(TMPDIRS):
$(E) "[DIR] $@" $(E) "[DIR] $@"
$(Q) $(MKDIR) $@ $(Q) $(MKDIR) $@
# Initialize optional git submodules if needed
opt/tools/serial-listen opt/webgui/Makefile:
$(E) "[GIT] Initializing submodules..."
$(Q) $(GIT) submodule update --init
# ============================================================================== # ==============================================================================
# PRIMARY BUILD TARGET AND PATTERN RULES # PRIMARY BUILD TARGET AND PATTERN RULES
# ============================================================================== # ==============================================================================

View File

@@ -1,6 +1,8 @@
## Changelog ## Changelog
### v0.75-alpha1 ### v0.75-alpha1
- Auto-initialize optional submodules when needed.
- Reduce number of watchdog timer resets.
- Fix parser tail pointer semantics. - Fix parser tail pointer semantics.
- Improve sensor log readability and minor naming fixes. - Improve sensor log readability and minor naming fixes.
- Add multiple README sections and use markdown formatting. - Add multiple README sections and use markdown formatting.

View File

@@ -27,19 +27,18 @@ build and install the project:
If there are any errors during the flashing process you If there are any errors during the flashing process you
should find more information in `bin/core.log`. See the should find more information in `bin/core.log`. See the
Makefile for all build-related settings and make sure Makefile for all build settings and make sure they are
they are correct for your current build environment. correct for your current environment.
To remove build related auxiliary files you may use one To remove build-related auxiliary files you may use one
of these commands: of these commands:
make clean make clean
make distclean make distclean
You can listen on the serial debug interface by running You can listen on the serial debug interface by running
the command below (if you have initialized the optional the command below. This will also initialize all optional
submodules as described in the section 'Setting a New submodules on first invocation.
Target'):
make listen make listen
@@ -52,11 +51,12 @@ information on how to configure the server.
### Setting a New Target ### Setting a New Target
The script below allows you to send serial commands (you The script below allows you to send serial commands. You
may need to run `git submodule update --init` first, if may need to run `git submodule update --init` first if the
the `opt/tools/` directory is empty): `opt/tools/` directory is empty (but this should usually be
done automatically when needed by another Makefile rule).
opt/tools/serial-send.py <command> <args ...> opt/tools/serial-send <command> <args ...>
Issue the SET command to update the target settings: Issue the SET command to update the target settings: