Created
September 2, 2016 13:59
-
-
Save tschm/b441e4d499aae6fc1ba4bb8bf35c34cc to your computer and use it in GitHub Desktop.
Makefile to document a python project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile | |
# | |
ROOT_DIR = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |
SPHINXBUILD = sphinx-build | |
BUILDDIR = ${ROOT_DIR}/build | |
SOURCEDIR = ${ROOT_DIR}/source | |
PROJECT = pylobnek | |
.PHONY: html | |
html: | |
rm -rf $(BUILDDIR)/* | |
$(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html | |
.PHONY: publish | |
publish: | |
@$(MAKE) html | |
ssh thomas@quantsrv "rm -rf /var/www/html/$(PROJECT)/*" | |
scp -r build/html/* thomas@quantsrv:/var/www/html/$(PROJECT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment