Skip to content

Commit

Permalink
Merge pull request #56 from SasView/55-dev-docs
Browse files Browse the repository at this point in the history
55: Generate Developer Docs
  • Loading branch information
butlerpd authored Dec 19, 2023
2 parents a9e77e5 + cdc8dd3 commit 5ace405
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 15 additions & 8 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Minimal makefile for Sphinx documentation
#

# Environment variables
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAPIDOC ?= sphinx-apidoc
APIOPTS = -d 8 -H SasData
DOCSDIR = docs
SOURCEDIR = source
BUILDDIR = build
CD = cd
DEVDIR = dev
LIBDIR = lib
GENDIR = generated
UP = ..

ifdef ComSpec
RMDIR = rmdir /s/q
Expand All @@ -20,27 +23,31 @@ else
PATHSEP = $(strip /)
endif

LIBDIR = $(BUILDDIR)$(PATHSEP)lib
SASDATABUILD = $(UP)$(PATHSEP)$(BUILDDIR)$(PATHSEP)$(LIBDIR)
DOCSSRC = $(SOURCEDIR)
DEV = $(DOCSSRC)$(PATHSEP)$(DEVDIR)
DEVGEN = $(DEV)$(PATHSEP)$(GENDIR)
DOCSBUILD = $(DOCSSRC)$(PATHSEP)$(BUILDDIR)

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

clean:
-$(RMDIR) "$(SOURCEDIR)$(PATHSEP)dev$(PATHSEP)generated/" "$(BUILDDIR)"
-$(RMDIR) "$(DEVGEN)" "$(DOCSBUILD)"

dir:
-$(MKDIR) "$(BUILDDIR)"
-$(MKDIR) "$(LIBDIR)"
-$(MKDIR) "$(DEVGEN)"
-$(MKDIR) "$(DOCSBUILD)"

.PHONY: help Makefile

# Generate the api docs
api:
$(SPHINXAPIDOC) -o "$(SOURCEDIR)$(PATHSEP)dev$(PATHSEP)generated/" $(APIOPTS) "$(LIBDIR)"
$(SPHINXAPIDOC) -o "$(DEVGEN)" $(APIOPTS) "$(SASDATABUILD)"

html: dir api
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(DOCSSRC)" "$(DOCSBUILD)" $(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).
Expand Down
4 changes: 2 additions & 2 deletions docs/source/dev/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Developer Documentation
=======================

.. toctree::
:maxdepth: 1
:maxdepth: 8

SasData <generated/modules>
SasData <generated/sasdata>

0 comments on commit 5ace405

Please sign in to comment.