diff --git a/Makefile b/Makefile index 6b5f5dd..593b5be 100644 --- a/Makefile +++ b/Makefile @@ -129,11 +129,13 @@ $(LIBLORA_TEST): $(LIBLORA_TEST_OBJS) .PHONY: all all: $(PROG)$(PROGEXT) $(PROG).list +DEPENDS = .arm_deps .test_deps .PHONY: depend -depend: .arm_deps .test_deps +depend: $(DEPENDS) -.sinclude ".arm_deps" -.sinclude ".test_deps" +.for i in $(DEPENDS) +.sinclude "$i" +.endfor .arm_deps: $(SRCS) $(ARMCC) $(ARMTARGET) $(CFLAGS) $(.ALLSRC) -MM > $@ || rm -f $@ @@ -149,7 +151,7 @@ $(PROG).list: $(PROG)$(PROGEXT) .PHONY: runbuild runbuild: $(SRCS) - for i in $(.MAKEFILE_LIST) $(.ALLSRC) $$(gsed ':x; /\\$$/ { N; s/\\\n//; tx }' < .depend | sed -e 's/^[^:]*://'); do if [ "$$i" != ".." ]; then echo $$i; fi; done | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all' + for i in $(.MAKEFILE_LIST) $(.ALLSRC) $$(cat $(DEPENDS) | gsed ':x; /\\$$/ { N; s/\\\n//; tx }' | sed -e 's/^[^:]*://'); do if [ "$$i" != ".." ]; then echo $$i; fi; done | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all' .PHONY: runtests runtests: Makefile lora_comms.py lora.py $(LIBLORA_TEST) $(LIBLORA_TEST_SRCS)