Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macros for documentation #2216

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add sphinx-specific options to not catch everything
  • Loading branch information
albinahlback committed Jan 29, 2025
commit c30c54b6fa7875a51b9f8ea677978fcc8c950bef
13 changes: 7 additions & 6 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ BUILDDIR = build

M4 := m4

SPHINX_ACTIONS := html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf latexpdfja text man texinfo info gettext changes xml pseudoxml linkcheck doctest coverage clean

MACROS := $(SOURCEDIR)/macros.m4
SRCS := $(wildcard $(SOURCEDIR)/*.rst.pp)
OBJS := $(patsubst %.pp,%,$(SRCS))

Expand All @@ -19,12 +22,10 @@ help:

preprocess: $(OBJS)

%.rst: %.rst.pp
%.rst: %.rst.pp $(MACROS)
@$(M4) -I $(SOURCEDIR) $< > $@

.PHONY: help Makefile preprocess
$(SPHINX_ACTIONS): Makefile preprocess
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# # Catch-all target: route all unknown targets to Sphinx using the new
# # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
# %: Makefile preprocess
# @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile preprocess