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
Show file tree
Hide file tree
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
push preprocessed stuff into build directory
  • Loading branch information
albinahlback committed Jan 30, 2025
commit e45bc3217492cee01fb8e463bddd121d2fc00cd6
6 changes: 3 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ 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))
SRCS := $(wildcard $(SOURCEDIR)/*.rst)
OBJS := $(patsubst $(SOURCEDIR)/%,$(BUILDDIR)/%,$(SRCS))

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

preprocess: $(OBJS)

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

$(SPHINX_ACTIONS): Makefile preprocess
Expand Down
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

sys.path.insert(0, os.path.abspath('../..'))
sys.path.append(os.path.abspath("."))
sys.path.append(os.path.abspath("../build"))
sys.path.append(os.path.abspath('../../src/python'))

# -- Project information -----------------------------------------------------
Expand Down