1
0
Fork 0
www/Makefile

29 lines
881 B
Makefile
Raw Permalink Normal View History

2023-09-11 22:38:24 +00:00
.PHONY: *
2024-06-25 20:34:32 +00:00
help: ## display this help
@awk 'BEGIN{FS = ":.*##"; printf "\033[1m\nUsage\n \033[1;92m make\033[0;36m <target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
2024-06-25 21:05:15 +00:00
build: ## compile src/ into out/
./build.py out/
2024-06-25 21:05:15 +00:00
index: ## generate search index with pagefind
2023-09-17 05:01:01 +00:00
pagefind --site out/
2024-06-25 21:05:15 +00:00
clean: ## delete out/ and srv/
2023-09-20 04:29:41 +00:00
test -e out && rm -rf out || true
test -e srv && rm -rf srv || true
2023-09-11 22:38:24 +00:00
2024-06-25 20:34:32 +00:00
watch: ## rebuild on changes
2023-09-20 03:32:45 +00:00
while inotifywait -r -e modify -e move -e create -e delete build.py Makefile src/; do make build; done
2023-09-11 22:38:24 +00:00
2024-06-25 20:34:32 +00:00
serve: ## serve out/
2023-09-11 22:38:24 +00:00
python -m http.server --directory out/
2023-09-12 03:07:12 +00:00
2024-06-25 20:34:32 +00:00
upload: ## build to srv/ and upload to www.alogoulogoi.com
2024-06-25 21:05:15 +00:00
git stash -u
2024-01-24 06:08:27 +00:00
test -e srv && rm -rf srv || true
2023-09-20 04:29:41 +00:00
./build.py srv/
pagefind --site srv/
2024-02-05 03:44:46 +00:00
rsync -av --delete srv/ ssh.alogoulogoi.com:/srv/www.alogoulogoi.com
2024-06-25 21:05:15 +00:00
git stash pop