Check if machine.c can be compiled for all machines

This commit is contained in:
UAb5eSMn
2026-03-30 22:28:36 +02:00
parent 97e73d95aa
commit 075d7e43f7
2 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -17,5 +17,7 @@ jobs:
run: |
apt update
apt install make gcc sdcc xxd python-is-python3 libjson-c-dev -y
- name: Check if machine.c can be compiled for all machines
run: make machine_check
- name: Make project
run: make MACHINE="KP_9000_6XHML_X2"
run: make MACHINE="KP_9000_6XHML_X2"
+11
View File
@@ -78,4 +78,15 @@ $(BUILDDIR)/rtlplayground.bin: $(BUILDDIR)/rtlplayground.img
.PHONY: clean all $(SUBDIRS) $(VERSION_HEADER)
.PHONY:
machine_check:
@mkdir -p $(BUILDDIR)/tmp
@set -eo pipefail; \
for MACHINE in `grep -e ' MACHINE_' machine.c | sed -e 's%^.* MACHINE_%%' -e 's%[ ]*//.*$$%%' | sort -u`; \
do \
echo "Checking $${MACHINE}"; \
$(CC) $(CC_FLAGS) -DMACHINE_$${MACHINE} -MMD -o $(BUILDDIR)/tmp/machine_check -c machine.c; \
done
@rm -rf $(BUILDDIR)/tmp
-include $(DEPS)