From a46967bad8e197279ba6303f38b6a131ff63b94c Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 19 Dec 2018 17:25:59 -0600 Subject: [PATCH] Add a `make livehtml` target --- Makefile | 6 +++++- doc/README | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5642762e11..21d99d8fca 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,10 @@ doc: configured docclean: configured $(MAKE) -C $(BUILD) $@ +livehtml: + @mkdir -p build/doc/html + sphinx-autobuild --ignore "testing/*" --ignore "*.git/*" --ignore "*.lock" --ignore "*.pyc" --ignore "*.swp" --ignore "*.swpx" --ignore "*.swx" -b html ./doc ./build/doc/html + dist: @test -e ../$(VERSION_FULL) && rm -ri ../$(VERSION_FULL) || true @cp -R . ../$(VERSION_FULL) @@ -63,4 +67,4 @@ configured: @test -d $(BUILD) || ( echo "Error: No build/ directory found. Did you run configure?" && exit 1 ) @test -e $(BUILD)/Makefile || ( echo "Error: No build/Makefile found. Did you run configure?" && exit 1 ) -.PHONY : all install clean doc docclean dist distclean configured +.PHONY : all install clean doc docclean dist distclean configured livehtml diff --git a/doc/README b/doc/README index 61a0fe4714..79491b15b9 100644 --- a/doc/README +++ b/doc/README @@ -22,3 +22,7 @@ render the reST files into HTML. That target depends on: * `Read the Docs Sphinx Theme `_ After the build completes, HTML documentation is symlinked in ``build/html``. + +There's also a ``make livehtml`` target in the top-level Makefile that +is useful for editing the reST files and seeing changes rendered out live +to a separate HTML browser.