]> git.donarmstrong.com Git - neurodebian.git/blobdiff - Makefile
Initial (crude) but somewhat functional state.
[neurodebian.git] / Makefile
index 39fe377f91cb704bde281923c86e2defdb63f095..1d79dab567c0afec860425e4f74ea43bb8578497 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,32 +7,34 @@ SPHINXBUILD   = sphinx-build
 PAPER         =
 
 # Internal variables.
+SRCDIR = build/source
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
+
+
+WWW_UPLOAD_URI = elrond:/home/hanke/public_html/archive
+WWW_DIR = build/html
+
 
 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck
 
-help:
-       @echo "Please use \`make <target>' where <target> is one of"
-       @echo "  html      to make standalone HTML files"
-       @echo "  pickle    to make pickle files"
-       @echo "  json      to make JSON files"
-       @echo "  htmlhelp  to make HTML files and a HTML help project"
-       @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"
+
+prep:
+       mkdir -p build
+       cp -r source build/
+
 
 clean:
-       -rm -rf build/*
+       -rm -rf build
 
-html:
+html: prep
        mkdir -p build/html build/doctrees
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
        @echo
        @echo "Build finished. The HTML pages are in build/html."
 
-pickle:
+pickle: prep
        mkdir -p build/pickle build/doctrees
        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
        @echo
@@ -40,20 +42,20 @@ pickle:
 
 web: pickle
 
-json:
+json: prep
        mkdir -p build/json build/doctrees
        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
        @echo
        @echo "Build finished; now you can process the JSON files."
 
-htmlhelp:
+htmlhelp: prep
        mkdir -p build/htmlhelp build/doctrees
        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
        @echo
        @echo "Build finished; now you can run HTML Help Workshop with the" \
              ".hhp project file in build/htmlhelp."
 
-latex:
+latex: prep
        mkdir -p build/latex build/doctrees
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
        @echo
@@ -61,15 +63,23 @@ latex:
        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
              "run these through (pdf)latex."
 
-changes:
+changes: prep
        mkdir -p build/changes build/doctrees
        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
        @echo
        @echo "The overview file is in build/changes."
 
-linkcheck:
+linkcheck: prep
        mkdir -p build/linkcheck build/doctrees
        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
        @echo
        @echo "Link check complete; look for any errors in the above output " \
-             "or in build/linkcheck/output.txt."
+       "or in build/linkcheck/output.txt."
+
+
+update-db:
+       python deb2rst/archive.py
+
+
+upload-website: html
+       rsync -rvzlhp --delete --chmod=Dg+s,g+rw $(WWW_DIR) $(WWW_UPLOAD_URI)