-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 1.19 KB
/
Makefile
File metadata and controls
38 lines (29 loc) · 1.19 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
# Makefile for Sphinx + Dart API documentation
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Dart API generator
DARTDOC_TOOL = ../tool/dartdoc_to_md
REPO_ROOT = ..
.PHONY: help clean html livehtml dartdoc html-python
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clean:
rm -rf $(BUILDDIR)
rm -rf reference/dart_api
# Generate Dart API markdown using the custom analyzer-based generator
dartdoc:
@echo "Generating Dart API documentation..."
cd $(DARTDOC_TOOL) && dart run bin/generate.dart --root $(shell cd $(REPO_ROOT) && pwd) --output docs/reference/dart_api
@echo "Dart API markdown generated in dart_api/"
# Build HTML docs (runs Dart generator first, then Sphinx)
html: dartdoc
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo "Build finished. Open $(BUILDDIR)/html/index.html"
# Build HTML docs without Dart doc generation (faster for Python-only changes)
html-python:
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo "Build finished. Open $(BUILDDIR)/html/index.html"
livehtml:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)