From 0e098d73c25ebc6d21e183609542d9f84f0a1721 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 30 Apr 2021 18:17:36 -0700 Subject: [PATCH] abstract out deps to allow adding more dep files... --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)