1
#############################################################
3
## Copyright (c) 2007-2011 by The University of Queensland ##
4
## Earth Systems Science Computational Centre (ESSCC) ##
5
## http://www.uq.edu.au/esscc ##
7
## Primary Business: Brisbane, Queensland, Australia ##
8
## Licensed under the Open Software License version 3.0 ##
9
## http://www.opensource.org/licenses/osl-3.0.php ##
11
#############################################################
13
include $(top_srcdir)/config/Python.am
15
## Hook for building the python API HTML documentation.
16
## Define it using the install-exec-hook because all the binaries
17
## and python source/byte-code files need to be installed
18
## so that Epydoc can import modules and access the docstrings.
20
GENGEODATADOCDIR = $(DESTDIR)$(datadir)/doc/$(PACKAGE)-$(VERSION)
21
PYTHONAPIDOCDIR = $(DESTDIR)$(datadir)/doc/$(PACKAGE)-$(VERSION)/pythonapi
22
EPYDOCTOPDIR = $(DESTDIR)$(datadir)/doc/$(PACKAGE)-$(VERSION)/pythonapi/html
23
GENGEODIR = $(DESTDIR)$(gengeodir)
24
LIBDIR = $(DESTDIR)$(libdir)
26
epydoc: install-exec-hook
29
export LD_LIBRARY_PATH=$(LIBDIR):$$LD_LIBRARY_PATH; \
30
export PYTHONPATH=$(GENGEODIR):$$PYTHONPATH; \
31
if test -d "$(GENGEODATADOCDIR)"; then chmod 755 "$(GENGEODATADOCDIR)"; else ${INSTALL} -m 755 -d "$(GENGEODATADOCDIR)"; fi; \
32
if test -d "$(PYTHONAPIDOCDIR)"; then chmod 755 "$(PYTHONAPIDOCDIR)"; else ${INSTALL} -m 755 -d "$(PYTHONAPIDOCDIR)"; fi; \
33
if test -d "$(EPYDOCTOPDIR)"; then chmod 755 "$(EPYDOCTOPDIR)"; else ${INSTALL} -m 755 -d "$(EPYDOCTOPDIR)"; fi; \
34
if test -f "$(GENGEODIR)/__init__.py"; then cd $(PYTHONAPIDOCDIR) && \
35
$(EPYDOC_EXE) --html --verbose --no-sourcecode --name "$(PACKAGE_NAME) $(VERSION)" gengeo; fi
38
if test -d "$(PYTHONAPIDOCDIR)"; then chmod -R +rw "$(PYTHONAPIDOCDIR)" &&\
39
rm -r -f "$(PYTHONAPIDOCDIR)"; fi