Improve the checking for 'rst2html.py' when creating HTML docs.

Update Waf to 1.5.0 (final).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3207 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-11-11 18:07:16 +00:00
parent 0f5bce0172
commit b0a6d923dc
3 changed files with 13 additions and 7 deletions

View File

@ -18,6 +18,7 @@ hacking-doc: ../HACKING
# when generating documentation, first try rst2html.py as it is the upstream default
doc: geany.txt
(rst2html.py --version) < /dev/null > /dev/null 2>&1 && \
rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \
rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html

BIN
waf vendored

Binary file not shown.

19
wscript
View File

@ -418,13 +418,18 @@ def shutdown():
launch('doxygen ' + doxyfile, 'Generating API reference documentation')
if Options.options.htmldoc:
os.chdir('doc')
# first try rst2html.py as it is the upstream default
ret = launch('rst2html.py -stg --stylesheet=geany.css geany.txt geany.html',
'Generating HTML documentation')
if not ret == 0:
launch('rst2html -stg --stylesheet=geany.css geany.txt geany.html',
'Generating HTML documentation (using fallback "rst2html")')
# first try rst2html.py as it is the upstream default, fall back to rst2html
cmd = Configure.find_program_impl(Build.bld.env, 'rst2html.py')
if not cmd:
cmd = Configure.find_program_impl(Build.bld.env, 'rst2html')
if cmd:
os.chdir('doc')
ret = launch(cmd + ' -stg --stylesheet=geany.css geany.txt geany.html',
'Generating HTML documentation')
else:
Utils.pprint('RED',
'rst2html.py could not be found. Please install the Python docutils package.')
sys.exit(1)
if Options.options.update_po:
# the following code was taken from midori's WAF script, thanks