Files
org_web/Makefile
Zaine 72cd3e89ad
All checks were successful
Build Org Website / build (push) Successful in 49s
authoring server
2026-05-07 12:19:23 +01:00

55 lines
1.4 KiB
Makefile
Executable File

.PHONY: all clean norm author help
VENV := .venv
PY := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
PERM_DIR := /home/zaine/master-folder/projects/scripts/bash-scripts
all: set-perms clean-output build search clean-venv
build:
@echo "Building project..."
emacs -Q --script build-site.el
set-perms:
@echo "Setting permissions for output directory..."
cd $(PERM_DIR) && sudo ./master-perms.sh
search: $(VENV)
@echo "Generating search index"
$(PY) search-index-json.py
$(VENV):
@echo "Generating virtual environment"
python3 -m venv $(VENV)
$(PIP) install -r requirements.txt
clean-output:
@echo "Cleaning output directory..."
rm -rf output/
clean-venv:
@echo "Cleaning virtual environment..."
rm -rf $(VENV)
norm:
@echo "sorting out the backups..."
find . -path ./backups -prune -o -type f -name '*~' -exec mv {} backups/ \;
author:
@echo "Starting local authoring UI..."
python3 authoring_server.py
# Show help message
help:
@echo "Available targets:"
@echo " make - Full rebuild"
@echo " make build - Rebuild the output directory"
@echo " make set-perms - Set permissions for output directory"
@echo " make clean-output - Remove output directory"
@echo " make clean-venv - Remove venv directory"
@echo " make norm - Move all files that end with ~ to the backup folder"
@echo " make author - Start the local authoring UI"
@echo " make search - creates the search index"
@echo " make help - Show this help message!"