first implementation but far to be optimal
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
VENV := .venv
|
||||
PYTHON := $(VENV)/bin/python
|
||||
PIP := $(VENV)/bin/pip
|
||||
MKDOCS := $(VENV)/bin/mkdocs
|
||||
|
||||
CARGO_DIR := src
|
||||
|
||||
DOC_DIR := docmd
|
||||
DOC_FILE := mkdocs.yml
|
||||
DOC_SITE := doc
|
||||
DOC_PORT := 8001
|
||||
|
||||
# ── virtualenv ────────────────────────────────────────────────────────────────
|
||||
|
||||
$(VENV)/bin/activate:
|
||||
python3 -m venv $(VENV)
|
||||
|
||||
$(MKDOCS): $(VENV)/bin/activate
|
||||
$(PIP) install --quiet --upgrade pip
|
||||
$(PIP) install --quiet \
|
||||
livereload watchdog \
|
||||
mkdocs mkdocs-material \
|
||||
mkdocs-mermaid2-plugin \
|
||||
mkdocs-bibtex
|
||||
|
||||
# ── obikmer binary ───────────────────────────────────────────────────────────
|
||||
|
||||
.PHONY: obikmer
|
||||
obikmer:
|
||||
cargo build --release --manifest-path $(CARGO_DIR)/Cargo.toml --bin obikmer
|
||||
debug:
|
||||
cargo build --manifest-path $(CARGO_DIR)/Cargo.toml --bin obikmer
|
||||
# ── documentation ─────────────────────────────────────────────────────────────
|
||||
|
||||
.PHONY: doc
|
||||
doc: $(MKDOCS)
|
||||
$(MKDOCS) build -f $(DOC_FILE)
|
||||
|
||||
.PHONY: doc-serve
|
||||
doc-serve: $(MKDOCS)
|
||||
$(MKDOCS) serve -f $(DOC_FILE) \
|
||||
--dev-addr=127.0.0.1:$(DOC_PORT) \
|
||||
--livereload
|
||||
.PHONY: clean-doc
|
||||
clean-doc:
|
||||
rm -rf $(DOC_SITE)/
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-doc
|
||||
rm -rf $(VENV)
|
||||
Reference in New Issue
Block a user