-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (46 loc) · 2.13 KB
/
Copy pathMakefile
File metadata and controls
56 lines (46 loc) · 2.13 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Makefile for local StrictDoc development
# Uses full escape for all variables as per user rules
.PHONY: help venv install clean docs reqif serve serve-milstd
# Default target
help:
@echo "Available targets:"
@echo " venv - Create Python virtual environment"
@echo " install - Install dependencies in virtual environment"
@echo " docs - Generate HTML documentation from all .sdoc files in the project"
@echo " reqif - Generate ReqIF documentation from all .sdoc files in the project"
@echo " serve - Serve generated documentation locally"
@echo " serve-milstd - Serve StrictDoc documentation locally"
@echo " clean - Clean generated files and virtual environment"
# Create virtual environment and install uv
venv:
python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install uv
# Install dependencies using uv for parallel installation
install: venv
venv/bin/uv pip install strictdoc toml pygments
# Generate HTML documentation
docs: install
venv/bin/strictdoc export --output-dir docs/ $(shell find . -type f -name '*.sdoc' | grep -v './venv/' | grep -v './docs/')
# Generate ReqIF documentation
reqif: install
venv/bin/strictdoc export --output-dir docs/ --formats reqif-sdoc $(shell find . -type f -name '*.sdoc' | grep -v './venv/' | grep -v './docs/')
# Generate both HTML and ReqIF documentation
all: install
venv/bin/strictdoc export --output-dir docs/ --formats html,reqif-sdoc $(shell find . -type f -name '*.sdoc' | grep -v './venv/' | grep -v './docs/')
# Serve documentation locally (requires Python http.server)
serve: docs
@echo "Serving documentation at http://localhost:8000"
@echo "Generated files are in docs/html/"
@echo "Press Ctrl+C to stop the server"
cd docs/html && python3 -m http.server 8000
# Serve MIL-STD-498 documentation locally (requires Python http.server)
serve-milstd: docs
@echo "Serving StrictDoc documentation at http://localhost:8001"
@echo "StrictDoc files are in docs/html/strictdoc/"
@echo "Press Ctrl+C to stop the server"
cd docs/html/strictdoc && python3 -m http.server 8001
# Clean generated files and virtual environment
clean:
rm -rf venv
rm -rf docs/