From bb8ffda3f4ff46bfdea22fd1f37f00ea4eba273d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Mon, 29 Sep 2008 18:09:43 +0000 Subject: [PATCH] When generating documentation, first try rst2html.py as it is the upstream default. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3022 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 3 +++ doc/Makefile.am | 2 ++ wscript | 9 ++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6cc921bd9..b06c5cb79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,9 @@ the correct value from Scintilla and use it (this fixes a display problem with Perl code like 'sub test()'). Add missing styles for filetype Perl. + * doc/Makefile.am, wscript: + When generating documentation, first try rst2html.py as it is + the upstream default. 2008-09-27 Enrico Tröger diff --git a/doc/Makefile.am b/doc/Makefile.am index 5ad2fe5f6..5531b243a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,7 +13,9 @@ pdf: geany.txt api-doc: Doxyfile doxygen +# when generating documentation, first try rst2html.py as it is the upstream default doc: geany.txt + rst2html.py -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html || \ rst2html -stg --stylesheet=geany.css $(srcdir)/geany.txt geany.html doc-clean: diff --git a/wscript b/wscript index f0cd2d1cc..a258c64c6 100644 --- a/wscript +++ b/wscript @@ -438,8 +438,12 @@ def shutdown(): if Options.options.htmldoc: os.chdir('doc') - launch('rst2html -stg --stylesheet=geany.css geany.txt geany.html', + # 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")') if Options.options.update_po: # the following code was taken from midori's WAF script, thanks @@ -467,6 +471,9 @@ def launch(command, status, success_color='GREEN'): Utils.pprint(success_color, status) try: ret = subprocess.call(command.split()) + except OSError, e: + ret = 1 + print str(e), ":", command except: ret = 1