-
Notifications
You must be signed in to change notification settings - Fork 1
/
epydoc.mk
41 lines (32 loc) · 1.19 KB
/
epydoc.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
if HAVE_EPYDOC
EPYDOC_HTML = html
EPYDOC_ARGS = -q --no-frames --html
MODULES = $(subst /,.,$(patsubst %.py,%, $(MODULE_FILES:/__init__.py=)))
# misc is in builddir
pypath = $(top_builddir):$(top_srcdir):$(PYTHONPATH)
html/index.html: $(patsubst %, $(top_srcdir)/%, $(MODULE_FILES)) $(top_srcdir)/common/gendoc.py
@echo Generating HTML documentation...
@$(PYTHON) -c "import os; print os.getpid() + 10" > display
@Xvfb -ac :`cat display` & echo $$! > Xvfb.pid
DISPLAY=:`cat display` PYTHONPATH=$(FLUMOTION_DIR):$(pypath) $(PYTHON) $(top_srcdir)/common/gendoc.py $(EPYDOC_ARGS) $(MODULES) 2>&1; echo $$? > ret
@kill `cat Xvfb.pid`
@rm Xvfb.pid display
@exit `cat ret; rm -f ret`
# FIXME: this stopped working when running with Xvfb, but no idea why
# we need to look at newer epydoc anyway
#| $(PYTHON) $(top_srcdir)/common/filterdoc.py
all-local-epydoc: html/index.html
check-local-epydoc:
@PYTHONPATH=$(pypath) $(PYTHON) $(top_srcdir)/common/gendoc.py --check $(MODULES) 2>&1 | $(PYTHON) $(top_srcdir)/common/epyfilter.py $(top_srcdir)/common/efc.py
clean-local-epydoc:
rm -rf html
-rm Xvfb.pid
else
EPYDOC_HTML =
all-local-epydoc:
true
check-local-epydoc:
true
clean-local-epydoc:
true
endif