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