-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
36 lines (28 loc) · 936 Bytes
/
Copy pathmakefile
File metadata and controls
36 lines (28 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PIP := pip
UV := uv
TARGET := gwkokab
PIP_FLAGS ?=
EXTRA ?=
GROUP ?=
INSTALL_TARGET := .
comma := ,
empty :=
space := $(empty) $(empty)
EXTRA_FLAGS := $(if $(EXTRA),$(addprefix --extra ,$(subst $(comma),$(space),$(EXTRA))))
GROUP_FLAGS := $(if $(GROUP),$(addprefix --group ,$(subst $(comma),$(space),$(GROUP))))
.DEFAULT_GOAL := help
.PHONY: all install uninstall cache_clean help doc check-uv
install: uninstall check-uv
GWKOKAB_DEV_BUILD=1 $(UV) $(PIP) install $(PIP_FLAGS) \
$(INSTALL_TARGET) -r pyproject.toml \
$(EXTRA_FLAGS) $(GROUP_FLAGS)
uninstall: check-uv
@$(UV) $(PIP) uninstall $(TARGET) 2>/dev/null || true
cache_clean: check-uv
$(UV) cache clean
doc: install
@mkdir -p docs/source
cp -r examples docs/source/
$(MAKE) -C docs html
check-uv:
@command -v $(UV) >/dev/null 2>&1 || { echo >&2 "Error: $(UV) is not installed."; exit 1; }