From 07011a947e1472751117173a4cf6b16835c09584 Mon Sep 17 00:00:00 2001 From: Settel Date: Thu, 29 Jul 2021 18:39:27 +0200 Subject: [PATCH] added toplevel Makefile --- Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2536161 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +TMUX_SESSION=knyc + +info: + @echo available targets: + @perl -ne 'm/^([\w\-]+):/ && print(" $$1\n");' Makefile + +grab-%: + $(MAKE) -C grabber "$@" + +run-all: + pexec -R -c -e TARGET \ + -r run-client \ + -r run-server \ + -- $(MAKE) '$$TARGET' + +run-tmux: + tmux start-server + -tmux kill-session -t "$(TMUX_SESSION)" + tmux new-session -d -s "$(TMUX_SESSION)" + tmux send-keys "make run-client" C-m + tmux splitw -v -l 5 + tmux send-keys "make run-server" C-m + tmux attach-session -t "$(TMUX_SESSION)" + +run-client: + (cd client/ && yarn dev) + +run-server: + $(MAKE) -C server run-loop + +expire: + $(MAKE) -C grabber expire + +lint: + (cd client/ && yarn lint) + +build: + (cd client/ && yarn build) + (cd client/ && yarn generate) + $(MAKE) -C server build + +run-standalone: + $(MAKE) -C server run-standalone