~ubuntu-branches/ubuntu/quantal/python-demgengeo/quantal

« back to all changes in this revision

Viewing changes to build/Epydoc/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2011-11-18 21:47:18 UTC
  • Revision ID: package-import@ubuntu.com-20111118214718-4ysqm3dhpqwdd7gd
Tags: upstream-0.99~bzr106
ImportĀ upstreamĀ versionĀ 0.99~bzr106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#############################################################
 
2
##                                                         ##
 
3
## Copyright (c) 2007-2011 by The University of Queensland ##
 
4
## Earth Systems Science Computational Centre (ESSCC)      ##
 
5
## http://www.uq.edu.au/esscc                              ##
 
6
##                                                         ##
 
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          ##
 
10
##                                                         ##
 
11
#############################################################
 
12
 
 
13
include $(top_srcdir)/config/Python.am
 
14
 
 
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.
 
19
if EPYDOC_ENABLED
 
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)
 
25
 
 
26
epydoc: install-exec-hook
 
27
 
 
28
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
 
36
 
 
37
uninstall-local:
 
38
        if test -d "$(PYTHONAPIDOCDIR)"; then chmod -R +rw "$(PYTHONAPIDOCDIR)" &&\
 
39
                rm -r -f "$(PYTHONAPIDOCDIR)"; fi
 
40
 
 
41
endif