knowyt/server/Makefile

36 lines
781 B
Makefile
Raw Normal View History

2021-07-28 20:21:14 +00:00
info:
@echo available targets:
@perl -ne 'm/^([a-zA-Z0-9\-]+):/ && print(" $$1\n");' Makefile
build:
$(MAKE) generate
go build -o knowyt src/knowyt.go
2021-07-28 20:21:14 +00:00
run:
go run src/knowyt.go
2021-07-28 20:21:14 +00:00
run-loop:
pexec -R -c -e TARGET \
-r _run-endless-loop \
-r _run-inotify-restart \
-- $(MAKE) '$$TARGET'
run-standalone:
2021-10-01 14:40:07 +00:00
cd src/ && ../knowyt
2021-07-28 20:21:14 +00:00
_run-endless-loop:
while true; do $(MAKE) run || sleep 3; done
_run-inotify-restart:
2021-09-19 21:31:24 +00:00
inotifyloop --exclude 'data/.*' . curl -s http://localhost:32039/__intern__/exit
clean:
rm -f knowyt
rm -f src/resources/*-generated.go
generate: src/resources/dist-generated.go
src/resources/dist-generated.go: $(shell find ../client/dist -type f)
src/resources/dist-generated.go: src/resources/dist-build.go
go generate src/resources/dist-build.go