Browse Source

move runbuild to .progs, improve comments..

main
John-Mark Gurney 2 years ago
parent
commit
30338ee49b
2 changed files with 20 additions and 11 deletions
  1. +16
    -11
      Makefile
  2. +4
    -0
      mk/mu.progs.mk

+ 16
- 11
Makefile View File

@@ -94,10 +94,6 @@ rng_save.c: Makefile
.test_deps: $(LIBSYOTE_TEST_SRCS) .test_deps: $(LIBSYOTE_TEST_SRCS)
$(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false) $(CC) $(CFLAGS) $(.ALLSRC) -MM | sed -e 's/\.o:/\.no:/' > $@ || (rm -f $@ && false)


.PHONY: runbuild
runbuild: $(SRCS) Makefile mk/*.mk
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 | sort -u | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all'

.PHONY: runtests .PHONY: runtests
runtests: Makefile syote_comms.py lora.py loraserv.py multicast.py $(LIBSYOTE_TEST) $(LIBSYOTE_TEST_SRCS) runtests: Makefile syote_comms.py lora.py loraserv.py multicast.py $(LIBSYOTE_TEST) $(LIBSYOTE_TEST_SRCS)
ls $(.ALLSRC) | entr sh -c '(cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(LIBSYOTE_TEST)) && ((PYTHONPATH="$(.CURDIR)" python3 -m coverage run -m unittest lora multicast loraserv syote_comms && coverage report --omit=$(.CURDIR)/p/\* -m -i) 2>&1 | head -n 30)' ls $(.ALLSRC) | entr sh -c '(cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(LIBSYOTE_TEST)) && ((PYTHONPATH="$(.CURDIR)" python3 -m coverage run -m unittest lora multicast loraserv syote_comms && coverage report --omit=$(.CURDIR)/p/\* -m -i) 2>&1 | head -n 30)'
@@ -122,6 +118,15 @@ $(.OBJDIR)/shared_key.h:


(cmp shared_key.h.tmp shared_key.h >/dev/null 2>&1 && rm shared_key.h.tmp) || mv shared_key.h.tmp shared_key.h (cmp shared_key.h.tmp shared_key.h >/dev/null 2>&1 && rm shared_key.h.tmp) || mv shared_key.h.tmp shared_key.h


# hard coded dependancy for when "make depend" has not been run.
irr_main.o: $(.OBJDIR)/shared_key.h

.include <mk/mu.progs.mk>

########################################################
# External Source Code #
########################################################

STROBE_NAME = strobe STROBE_NAME = strobe
STROBE_REPO = https://git.code.sf.net/p/strobe/code STROBE_REPO = https://git.code.sf.net/p/strobe/code
STROBE_BRANCH = master STROBE_BRANCH = master
@@ -140,8 +145,13 @@ update-$($(module)_NAME):
git subtree pull -P $($(module)_NAME) --squash $($(module)_REPO) $($(module)_BRANCH) git subtree pull -P $($(module)_NAME) --squash $($(module)_REPO) $($(module)_BRANCH)
.endfor .endfor


# Making diagrams, imported from fbsdembdev
# =========================================
########################################################
# Diagrams #
########################################################

# imported from fbsdembdev
#
# Uses Graph Easy to convert to ASCII art:
# https://github.com/ironcamel/Graph-Easy # https://github.com/ironcamel/Graph-Easy


.SUFFIXES: .getxt .diag .html .SUFFIXES: .getxt .diag .html
@@ -155,8 +165,3 @@ update-$($(module)_NAME):
DIAG?=diag DIAG?=diag
test-diag: test-diag:
ls $(.CURDIR)/box.sh $(.CURDIR)/$(DIAG).getxt $(.CURDIR)/Makefile | entr sh -c 'cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(DIAG).diag && cat $(.OBJDIR)/$(DIAG).diag' ls $(.CURDIR)/box.sh $(.CURDIR)/$(DIAG).getxt $(.CURDIR)/Makefile | entr sh -c 'cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(DIAG).diag && cat $(.OBJDIR)/$(DIAG).diag'

# hard coded dependancy for when "make depend" has not been run.
irr_main.o: $(.OBJDIR)/shared_key.h

.include <mk/mu.progs.mk>

+ 4
- 0
mk/mu.progs.mk View File

@@ -17,6 +17,10 @@ $(i).list: $(i)$(PROGEXT)


all: $(ALLTGTS) all: $(ALLTGTS)


.PHONY: runbuild
runbuild: $(SRCS) Makefile mk/*.mk
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 | sort -u | entr -d sh -c 'echo starting...; cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) depend && $(MAKE) $(.MAKEFLAGS) all'

# native objects # native objects
.SUFFIXES: .no .SUFFIXES: .no
.c.no: .c.no:


Loading…
Cancel
Save