aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorThierry Crozat2019-04-21 01:21:56 +0100
committerThierry Crozat2019-04-21 11:01:34 +0100
commit9ebb91411aaf57c0ccc5667b2f0743c5454fd1da (patch)
treeba9584b3f9f8a37bb64b84830e529c724ed6c182 /configure
parent66ef22d55504951c43f1641145431651bfab78f7 (diff)
downloadscummvm-rg350-9ebb91411aaf57c0ccc5667b2f0743c5454fd1da.tar.gz
scummvm-rg350-9ebb91411aaf57c0ccc5667b2f0743c5454fd1da.tar.bz2
scummvm-rg350-9ebb91411aaf57c0ccc5667b2f0743c5454fd1da.zip
CONFIGURE: Generate html README and NEWS by default on macOS
There was already a configure option to specify a output format other than plain text, but this had to be specified explicitely when executing configure. Now the ports can define a default other than plain text. On macOS now by default pandoc generate html output. It could in theory also generate rtf, but those are not properly displayed by TextEdit, and in addition TextEdit cannot handle link internal to the document (such as for the TOC). But if we are fine with no link for the TOC, we could pipe the pandoc html output with textutil to generate the RTF documents. Also this change allows to have an extension for the pandoc output files. By default this is empty for plain text (as before) and the same as the format otherwise (for example .rtf or .html).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 26 insertions, 1 deletions
diff --git a/configure b/configure
index 1289b2158f..62b43d35ab 100755
--- a/configure
+++ b/configure
@@ -229,7 +229,8 @@ NASM=""
_tainted_build=no
PANDOC=""
_pandocpath="$PATH"
-_pandocformat="plain"
+_pandocformat="default"
+_pandocext="default"
# The following variables are automatically detected, and should not
# be modified otherwise. Consider them read-only.
_posix=no
@@ -2705,6 +2706,16 @@ case $_host_os in
echo "Could not determine path for Xcode Tools"
fi
fi
+
+ # Use pandoc to generate README and NEWS file for the bundle
+ # Also default to HTML rather than plain text as it gives a nicer
+ # formating, especially for the README. We could consider using RTF
+ # as well, but TextEdit does not support links within the document,
+ # and having a TOC with links, which we do with html, is quite convenient.
+ _pandoc=yes
+ if test "$_pandocformat" = "default"; then
+ _pandocformat="html"
+ fi
;;
dreamcast)
append_var DEFINES "-D__DC__"
@@ -5141,6 +5152,19 @@ fi
define_in_config_if_yes $_pandoc 'USE_PANDOC'
+# Default to plain text output for pandoc
+if test -z "$_pandocformat" -o "$_pandocformat" = "default"; then
+ _pandocformat="plain"
+fi
+
+if test "$_pandocext" = "default"; then
+ if test "$_pandocformat" = plain; then
+ _pandocext=""
+ else
+ _pandocext=".$_pandocformat"
+ fi
+fi
+
#
# Enable vkeybd / keymapper / event recorder
#
@@ -5619,6 +5643,7 @@ NASM := $NASM
NASMFLAGS := $NASMFLAGS
PANDOC := $PANDOC
PANDOCFORMAT := $_pandocformat
+PANDOCEXT := $_pandocext
ZLIB_LIBS := $ZLIB_LIBS
ZLIB_CFLAGS := $ZLIB_CFLAGS