Skip to content

Commit

Permalink
Improve the checking for 'rst2html.py' when creating HTML docs.
Browse files Browse the repository at this point in the history
Update Waf to 1.5.0 (final).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3207 ea778897-0a13-0410-b9d1-a72fbfd435f5
  • Loading branch information
eht16 committed Nov 11, 2008
1 parent 0f5bce0 commit b0a6d92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified waf
Binary file not shown.
19 changes: 12 additions & 7 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0a6d92

Please sign in to comment.