aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatan Bareket2018-12-19 09:17:14 -0500
committerMatan Bareket2018-12-25 11:37:26 -0500
commit6ce49ca04d9f02749a815759ffff088cfd9ead2e (patch)
treed36286f9c276b240939dda5ee85f74c8e79817c7
parent399fd7835b5d616c25e34e03d4cd04eb062336dc (diff)
downloadscummvm-rg350-6ce49ca04d9f02749a815759ffff088cfd9ead2e.tar.gz
scummvm-rg350-6ce49ca04d9f02749a815759ffff088cfd9ead2e.tar.bz2
scummvm-rg350-6ce49ca04d9f02749a815759ffff088cfd9ead2e.zip
BUILD: Update pandoc options to support different formats/filenames
-rw-r--r--Makefile.common4
-rwxr-xr-xconfigure34
2 files changed, 25 insertions, 13 deletions
diff --git a/Makefile.common b/Makefile.common
index 2a0490d8fa..f6707f710b 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -232,7 +232,7 @@ VERFILE := $(DISTDIR)/$(DISTNAME)/base/internal_version.h
ifdef USE_PANDOC
# Convert README.md to plain text for any platform that might require it
readme: README.md
- $(QUIET_PANDOC)$(PANDOC) $(PANDOCFLAGS)
+ $(QUIET_PANDOC)$(PANDOC) -f gfm -t $(PANDOCFORMAT) -o $(PANDOCOUTPUT) README.md
endif
# TODO git via $(GITROOT)
@@ -266,7 +266,7 @@ dist-src: \
# Common files
DIST_FILES_DOCS:=$(addprefix $(srcdir)/,AUTHORS COPYING COPYING.BSD COPYING.LGPL COPYING.FREEFONT COPYRIGHT NEWS README.md)
ifdef USE_PANDOC
-DIST_FILES_DOCS+=README
+DIST_FILES_DOCS+=$(PANDOCOUTPUT)
endif
DIST_FILES_DOCS_languages=cz da de es fr it no-nb se
diff --git a/configure b/configure
index 64d49af6d2..5799aa52eb 100755
--- a/configure
+++ b/configure
@@ -180,7 +180,7 @@ _no_undefined_var_template=no
_no_pragma_pack=no
_bink=yes
_cloud=auto
-_convert_readme=no
+_pandoc=no
# Default vkeybd/keymapper/eventrec options
_vkeybd=no
_keymapper=no
@@ -225,8 +225,10 @@ _nasmpath="$PATH"
NASMFLAGS=""
NASM=""
_tainted_build=no
+PANDOC=""
_pandocpath="$PATH"
-PANDOCFLAGS=""
+_pandocoutput="README"
+_pandocformat="plain"
# The following variables are automatically detected, and should not
# be modified otherwise. Consider them read-only.
_posix=no
@@ -1008,7 +1010,6 @@ Optional Features:
--disable-taskbar don't build support for taskbar and launcher integration
--disable-cloud don't build cloud support
--disable-system-dialogs don't build support for system dialogs
- --enable-pandoc convert README.md to README
--enable-vkeybd build virtual keyboard support
--enable-keymapper build key mapper support
--enable-eventrecorder enable event recording functionality
@@ -1093,6 +1094,9 @@ Optional Libraries:
--with-nasm-prefix=DIR prefix where nasm executable is installed (optional)
--disable-nasm disable assembly language optimizations [autodetect]
+ --with-pandoc-output=FILE filename to convert README.md to (optional)
+ --with-pandoc-format=FORMAT pandoc format to use during the conversion (optional)
+
--with-readline-prefix=DIR prefix where readline is installed (optional)
--disable-readline disable readline support in text console [autodetect]
@@ -1184,8 +1188,6 @@ for ac_option in $@; do
--disable-osx-dock-plugin) _osxdockplugin=no;;
--enable-nasm) _nasm=yes ;;
--disable-nasm) _nasm=no ;;
- --enable-pandoc) _convert_readme=yes;;
- --disable-pandoc) _convert_readme=no;;
--enable-mpeg2) _mpeg2=yes ;;
--disable-mpeg2) _mpeg2=no ;;
--enable-a52) _a52=yes ;;
@@ -1396,6 +1398,16 @@ for ac_option in $@; do
arg=`echo $ac_option | cut -d '=' -f 2`
_nasmpath="$arg:$arg/bin"
;;
+ --with-pandoc-output=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ _pandocoutput="$arg"
+ _pandoc=yes
+ ;;
+ --with-pandoc-format=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ _pandocformat="$arg"
+ _pandoc=yes
+ ;;
--with-staticlib-prefix=*)
_staticlibpath=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -5078,7 +5090,7 @@ define_in_config_if_yes $_nasm 'USE_NASM'
#
# Check for pandoc
#
-if test "$_convert_readme" = yes ; then
+if test "$_pandoc" = yes ; then
echocheck "pandoc"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR
@@ -5086,7 +5098,6 @@ if test "$_convert_readme" = yes ; then
for path_dir in $_pandocpath; do
if test -x "$path_dir/pandoc$NATIVEEXEEXT" ; then
PANDOC="$path_dir/pandoc$NATIVEEXEEXT"
- PANDOCFLAGS="-f gfm -t plain -o README README.md"
break
fi
done
@@ -5094,13 +5105,13 @@ if test "$_convert_readme" = yes ; then
IFS="$ac_save_ifs"
if ! test "$PANDOC" ; then
- _convert_readme = no
+ _pandoc = no
fi
fi
-echo $_convert_readme
-define_in_config_if_yes $_convert_readme 'USE_PANDOC'
+echo $_pandoc
+define_in_config_if_yes $_pandoc 'USE_PANDOC'
#
# Enable vkeybd / keymapper / event recorder
@@ -5579,7 +5590,8 @@ EXEEXT := $HOSTEXEEXT
NASM := $NASM
NASMFLAGS := $NASMFLAGS
PANDOC := $PANDOC
-PANDOCFLAGS := $PANDOCFLAGS
+PANDOCOUTPUT := $_pandocoutput
+PANDOCFORMAT := $_pandocformat
ZLIB_LIBS := $ZLIB_LIBS
ZLIB_CFLAGS := $ZLIB_CFLAGS