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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
EPYDOC=epydoc
.PHONY: all doc update-doc clean check-epydoc check-docutils \
pyxmpp.xmi pyxmpp-auto.xmi
WEBFILES=www/index.html www/CHANGES.html www/ChangeLog.html \
www/style.css
RST2HTML=rst2html
all: doc
www: $(WEBFILES) doc
publish: www
rsync -e ssh -rav --exclude .svn www/ ssh.jabberstudio.org:/var/projects/pyxmpp/www
doc: doc-tstamp check-epydoc check-docutils
update-doc:
-rm -f doc-tstamp
$(MAKE) doc
doc-tstamp:
$(MAKE) -C ..
rm -f pyxmpp 2>/dev/null ; ln -s ../build/lib*/pyxmpp .
$(EPYDOC) --html --show-imports --no-frames --ignore-param-mismatch \
-o www/api -n PyXMPP -u http://pyxmpp.jabberstudio.org/ pyxmpp
touch doc-tstamp
-rm -f pyxmpp 2>/dev/null
pyxmpp.xmi:
[ -f pyxmpp.xmi ]
[ -f pyxmpp-auto.xmi ]
[ ! -f pyxmpp.xmi.bak ]
mv pyxmpp.xmi pyxmpp.xmi.bak
../auxtools/xmimerge.py pyxmpp.xmi.bak pyxmpp-auto.xmi > pyxmpp.xmi
pyxmpp-auto.xmi:
rm -f pyxmpp 2>/dev/null ; ln -s ../build/lib*/pyxmpp .
../auxtools/code2xmi.py pyxmpp > pyxmpp-auto.xmi
-rm -f pyxmpp 2>/dev/null
check-epydoc:
@if ! $(EPYDOC) --help >/dev/null ; then \
echo "*************************************************" ; \
echo "You need Epydoc to generate PyXMPP documentation." ; \
echo "You can find it at http://epydoc.sourceforge.net/" ; \
echo "*************************************************" ; \
exit 1 ; \
fi
check-docutils:
@if ! python -c "import docutils" --help >/dev/null ; then \
echo "*****************************************************" ; \
echo "You need docutils to generate PyXMPP documentation. " ; \
echo "You can find them at http://docutils.sourceforge.net/" ; \
echo "*****************************************************" ; \
exit 1 ; \
fi
index.html: ../README
$(RST2HTML) --rfc-references --initial-header-level=2 ../README > index.html
CHANGES.html: ../CHANGES
$(RST2HTML) --rfc-references --initial-header-level=2 --no-doc-title ../CHANGES > CHANGES.html
ChangeLog.html: ../ChangeLog
echo -ne '<div class="document">\n<h2>ChangeLog</h2>\n<pre>' > ChangeLog.html
sed -e's/&/\&/;s/</\</;s/>/\>/' ../ChangeLog >> ChangeLog.html
echo -ns '</pre>\n</div>\n' >> ChangeLog.html
www/%.html: %.html template.html
../auxtools/htmlmerge.py template.html $*.html \
| xmllint --nsclean - | sed -e's/name="\([^"]*\)" id="\1"/name="\1"/g' > $@
clean:
-rm -f index.html CHANGES.html ChangeLog.html
-rm -f pyxmpp-auto.xmi
.DELETE_ON_ERROR:
|