1.PHONY: default \ 2 config build test install sdist \ 3 docs rst2html sphinx sphinx-html sphinx-pdf epydoc epydoc-html \ 4 clean distclean srcclean docsclean fullclean uninstall 5 6PYTHON = python 7 8default: build 9 10config: 11 ${PYTHON} setup.py config ${CONFIGOPT} 12 13build: 14 ${PYTHON} setup.py build ${BUILDOPT} 15 16test: 17 ${MPIEXEC} ${VALGRIND} ${PYTHON} test/runtests.py < /dev/null 18 19install: build 20 ${PYTHON} setup.py install ${INSTALLOPT} --home=${HOME} 21 22sdist: docs 23 ${PYTHON} setup.py sdist ${SDISTOPT} 24 25clean: 26 ${PYTHON} setup.py clean --all 27 28distclean: clean 29 -${RM} -r build _configtest.* *.py[co] 30 -${RM} -r MANIFEST dist petsc4py.egg-info 31 -${RM} -r `find . -name '__pycache__'` 32 -${RM} `find . -name '*.py[co]'` 33 -${RM} `find . -name '*~'` 34 35srcclean: 36 -${RM} src/petsc4py.PETSc.c 37 -${RM} src/libpetsc4py/libpetsc4py.[ch] 38 -${RM} src/include/petsc4py/petsc4py.PETSc.h 39 -${RM} src/include/petsc4py/petsc4py.PETSc_api.h 40 41fullclean: distclean srcclean docsclean 42 43uninstall: 44 -${RM} -r ${HOME}/lib/python/petsc4py 45 -${RM} -r ${HOME}/lib/python/petsc4py-*-py*.egg-info 46 47# ---- 48 49docs: rst2html sphinx epydoc 50 51docsclean: 52 -${RM} docs/*.html docs/*.pdf 53 -${RM} -r docs/usrman docs/apiref 54 55RST2HTML = rst2html 56RST2HTMLOPTS = --no-compact-lists --cloak-email-addresses 57rst2html: 58 ${RST2HTML} ${RST2HTMLOPTS} docs/index.rst > docs/index.html 59 ${RST2HTML} ${RST2HTMLOPTS} LICENSE.txt > docs/LICENSE.html 60 ${RST2HTML} ${RST2HTMLOPTS} HISTORY.txt > docs/HISTORY.html 61 62SPHINXBUILD = sphinx-build 63SPHINXOPTS = 64sphinx: sphinx-html sphinx-pdf 65sphinx-html: 66 ${PYTHON} -c 'import petsc4py.PETSc' 67 mkdir -p build/doctrees docs/usrman 68 ${SPHINXBUILD} -b html -d build/doctrees ${SPHINXOPTS} \ 69 docs/source docs/usrman 70sphinx-pdf: 71 ${PYTHON} -c 'import petsc4py.PETSc' 72 mkdir -p build/doctrees build/latex 73 ${SPHINXBUILD} -b latex -d build/doctrees ${SPHINXOPTS} \ 74 docs/source build/latex 75 ${MAKE} -C build/latex all-pdf > /dev/null 76 mv build/latex/*.pdf docs/ 77 78EPYDOCBUILD = ${PYTHON} ./conf/epydocify.py 79EPYDOCOPTS = 80epydoc: epydoc-html 81epydoc-html: 82 ${PYTHON} -c 'import petsc4py.PETSc' 83 mkdir -p docs/apiref 84 ${EPYDOCBUILD} ${EPYDOCOPTS} -o docs/apiref 85 86# ---- 87