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:
parent
0f5bce0172
commit
b0a6d923dc
@ -18,6 +18,7 @@ hacking-doc: ../HACKING
|
|||||||
|
|
||||||
# when generating documentation, first try rst2html.py as it is the upstream default
|
# when generating documentation, first try rst2html.py as it is the upstream default
|
||||||
doc: geany.txt
|
doc: geany.txt
|
||||||
|
(rst2html.py --version) < /dev/null > /dev/null 2>&1 && \
|
||||||
rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \
|
rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \
|
||||||
rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html
|
rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html
|
||||||
|
|
||||||
|
19
wscript
19
wscript
@ -418,13 +418,18 @@ def shutdown():
|
|||||||
launch('doxygen ' + doxyfile, 'Generating API reference documentation')
|
launch('doxygen ' + doxyfile, 'Generating API reference documentation')
|
||||||
|
|
||||||
if Options.options.htmldoc:
|
if Options.options.htmldoc:
|
||||||
os.chdir('doc')
|
# first try rst2html.py as it is the upstream default, fall back to rst2html
|
||||||
# first try rst2html.py as it is the upstream default
|
cmd = Configure.find_program_impl(Build.bld.env, 'rst2html.py')
|
||||||
ret = launch('rst2html.py -stg --stylesheet=geany.css geany.txt geany.html',
|
if not cmd:
|
||||||
'Generating HTML documentation')
|
cmd = Configure.find_program_impl(Build.bld.env, 'rst2html')
|
||||||
if not ret == 0:
|
if cmd:
|
||||||
launch('rst2html -stg --stylesheet=geany.css geany.txt geany.html',
|
os.chdir('doc')
|
||||||
'Generating HTML documentation (using fallback "rst2html")')
|
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:
|
if Options.options.update_po:
|
||||||
# the following code was taken from midori's WAF script, thanks
|
# the following code was taken from midori's WAF script, thanks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user