Tay Ray Chuan committed e525722 Merge

Merge shift of store config to sphinx's

Closes #1100.

  • Participants
  • Parent commits 1b605c8, 2982016

Comments (0)

Files changed (2)

 # Makefile for Sphinx documentation
-# Typical usage for Satchmo:
-# make DJANGO_SETTINGS_MODULE=simplestore.settings ROOT_DIR=/path/to/satchmo-working/ html
 # You can set these variables from the command line.
 SPHINXBUILD   = sphinx-build
 PAPER         =
 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter
 ALLSPHINXOPTS   = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean sphinx-autodoc html web pickle htmlhelp latex changes linkcheck
+.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
 	@echo "Please use \`make <target>' where <target> is one of"
 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
 	@echo "  changes   to make an overview over all changed/added/deprecated items"
 	@echo "  linkcheck to check all external links for integrity"
-	@echo ""
-	@echo "Ensure also that ROOT_DIR is defined (the absolute path to the directory"
-	@echo "containing satchmo's apps and projects, usually the parent directory of"
-	@echo "this file)."
 	-rm -rf .build/*
-# Set up a django/satchmo store for sphinx's autodoc.
-# You *must* set this variable from the command line.
-ifeq ($(ROOT_DIR),)
-	@echo "Please define ROOT_DIR (the absolute path to the directory containing"
-	@echo "satchmo's apps and projects, usually the parent directory of this file)."
-	@exit 2
-# Fallback on the "simple" sample store.
-export DJANGO_SETTINGS_MODULE = simple.settings
-# The separator used in PATH.
-# Use ":" unless WINDOWS is defined (use ";" instead).
-# Indent with space here instead of tabs so that make doesn't treat lines as a
-# shell command.
-ifdef WINDOWS
-# Paths
-PROJECT_DIR = $(ROOT_DIR)/projects
-# Set them in the environment so that the sphinx child process find
-# satchmo and friends.
-html: sphinx-autodoc
 	mkdir -p .build/html .build/doctrees
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
 	@echo "Build finished. The HTML pages are in .build/html."
-pickle: sphinx-autodoc
 	mkdir -p .build/pickle .build/doctrees
 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) .build/pickle
 web: pickle
-htmlhelp: sphinx-autodoc
 	mkdir -p .build/htmlhelp .build/doctrees
 	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
 	@echo "Build finished; now you can run HTML Help Workshop with the" \
 	      ".hhp project file in .build/htmlhelp."
-latex: sphinx-autodoc
 	mkdir -p .build/latex .build/doctrees
 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
 	      "run these through (pdf)latex."
-changes: sphinx-autodoc
 	mkdir -p .build/changes .build/doctrees
 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
 	@echo "The overview file is in .build/changes."
-linkcheck: sphinx-autodoc
 	mkdir -p .build/linkcheck .build/doctrees
 	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
 # documentation root, use os.path.abspath to make it absolute, like shown here.
+# Add satchmo apps.
+# Setup the 'simple' store.
+os.environ['DJANGO_SETTINGS_MODULE'] = 'simple.settings'
 # -- General configuration -----------------------------------------------------
 # Add any Sphinx extension module names here, as strings. They can be extensions