knowyt/server/Makefile

39 lines
866 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
2022-11-04 20:51:14 +00:00
setup:
cd src/ && go mod tidy
2021-07-28 20:21:14 +00:00
build:
2022-09-11 18:10:38 +00:00
-mkdir -p ../client/.output/public/
2023-05-17 19:55:44 +00:00
-mkdir data/
$(MAKE) generate
2022-03-03 09:16:50 +00:00
cd src/ && CGO_ENABLED=0 go build -o ../knowyt knowyt.go
2021-07-28 20:21:14 +00:00
run:
2022-03-03 09:16:50 +00:00
$(MAKE) build
2022-11-06 14:41:13 +00:00
./knowyt -v
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-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/.output/public/ -type f)
src/resources/dist-generated.go: src/resources/dist-build.go
go generate src/resources/dist-build.go