Skip to content

Commit 8b2f23f

Browse files
authored
Merge pull request bemanproject#145 from steve-downey/mrdocs
Merge updated doc comments and support for mrdocs in addition to doxygen. * Add mrdocs configuration * Support for using mrdocs to generate docs from code * Cleanup more documentation * Remove upgrade of packages from pip install The new pip (24.3) has problems with older packages. Errors of the form ``` AttributeError: 'InstallRequirement' object has no attribute 'use_pep517' ``` That are unfixable from the user side.
2 parents 6bd3c0a + 0fbb147 commit 8b2f23f

File tree

4 files changed

+202
-127
lines changed

4 files changed

+202
-127
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ compile_commands.json
3131

3232
/docs/html
3333
/docs/latex
34+
/docs/adoc/

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,16 @@ $(_build_path)/CMakeCache.txt: | $(_build_path) .gitmodules
5757
-rm compile_commands.json
5858
ln -s $(_build_path)/compile_commands.json
5959

60+
$(_build_path)/compile_commands.json : $(_build_path)/CMakeCache.txt
61+
62+
compile_commands.json: $(_build_path)/compile_commands.json
63+
-rm compile_commands.json
64+
ln -s $(_build_path)/compile_commands.json
65+
6066
TARGET:=all
67+
compile: compile_commands.json
6168
compile: $(_build_path)/CMakeCache.txt ## Compile the project
69+
compile: ## Compile the project
6270
cmake --build $(_build_path) --config $(CONFIG) --target all -- -k 0
6371

6472
compile-headers: $(_build_path)/CMakeCache.txt ## Compile the headers
@@ -135,7 +143,7 @@ requirements-dev.txt: requirements-dev.in
135143

136144
$(VENV):
137145
$(PYEXECPATH) -m venv $(VENV)
138-
$(PIP) install --upgrade pip setuptools wheel
146+
$(PIP) install pip setuptools wheel
139147
$(PIP) install pip-tools
140148

141149
$(VENV)/$(MARKER): requirements.txt requirements-dev.txt | $(VENV)
@@ -178,6 +186,12 @@ view-coverage: ## View the coverage report
178186
docs: ## Build the docs with Doxygen
179187
doxygen docs/Doxyfile
180188

189+
.PHONY: mrdocs
190+
mrdocs: ## Build the docs with Doxygen
191+
-rm -rf docs/adoc
192+
cd docs && NO_COLOR=1 mrdocs mrdocs.yml 2>&1 | sed 's/\x1b\[[0-9;]*m//g'
193+
find docs/adoc -name '*.adoc' | xargs asciidoctor
194+
181195
# Help target
182196
.PHONY: help
183197
help: ## Show this help.

docs/mrdocs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# $schema: https://mrdocs.com/docs/mrdocs/develop/_attachments/mrdocs.schema.json
2+
# yaml-language-server: $schema=https://mrdocs.com/docs/mrdocs/develop/_attachments/mrdocs.schema.json
3+
4+
---
5+
source-root: ..
6+
input:
7+
- ../include
8+
exclude:
9+
- ../include/beman/optional/detail
10+
exclude-patterns:
11+
- ../include/beman/optional/detail/**
12+
- ../tests/**
13+
- ../examples/**
14+
includes:
15+
- ../include
16+
file-patterns:
17+
- '*.hpp'
18+
include-symbols:
19+
- 'beman::optional::**'
20+
implementation-defined:
21+
- 'beman::optional::detail'
22+
multipage: true
23+
generator: adoc
24+
output: adoc

0 commit comments

Comments
 (0)