Skip to content

Commit

Permalink
build: unify docdir to doc_dir
Browse files Browse the repository at this point in the history
Make it similar to test_dir and src_dir etc. Remove the unnecessary doc
variable while at it.
  • Loading branch information
jnikula committed Jan 27, 2024
1 parent 366e075 commit 9789e9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Makefile.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (c) 2018, Jani Nikula <[email protected]>
# Licensed under the terms of BSD 2-Clause, see LICENSE for details.

dir := .

RST := $(RST) CHANGELOG.rst CONTRIBUTING.rst README.rst

# Static analysis
Expand Down
11 changes: 4 additions & 7 deletions doc/Makefile.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
# Makefile for Sphinx documentation
#

dir := doc

# dir may get overwritten, make a copy
docdir := $(dir)
doc_dir := doc

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= -t use-installed-hawkmoth
SPHINXBUILD ?= sphinx-build
SOURCEDIR = $(docdir)
BUILDDIR = $(docdir)/_build
SOURCEDIR = $(doc_dir)
BUILDDIR = $(doc_dir)/_build

CLEAN := $(CLEAN) $(BUILDDIR)

update-examples:
$(test_dir)/update-examples.py > $(docdir)/examples.rst
$(test_dir)/update-examples.py > $(doc_dir)/examples.rst

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile.local
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test-verbose:

# Ensure a) update-examples works, and b) examples have been updated.
check-examples:
$(test_dir)/update-examples.py | diff -u $(docdir)/examples.rst -
$(test_dir)/update-examples.py | diff -u $(doc_dir)/examples.rst -

quick-test:
pytest -n auto -m "not full"
Expand Down

0 comments on commit 9789e9f

Please sign in to comment.