diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2013-09-09 04:23:06 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2013-09-09 04:34:56 +0200 |
commit | 005407338d8943cbb5ce551ee7f6ae9ac94091a6 (patch) | |
tree | 2f99f1d72826648cc962566ee0e2106f98f2e2bf /configure | |
parent | 1b4d9b26cbd582e71cfb0e45c95a2d27d91db602 (diff) | |
download | mpv-005407338d8943cbb5ce551ee7f6ae9ac94091a6.tar.bz2 mpv-005407338d8943cbb5ce551ee7f6ae9ac94091a6.tar.xz |
Add PDF manual target
This builds a PDF version of the manpage using rst2latex
and pdflatex, and installs it to PREFIX/share/doc/mpv by
default.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -286,6 +286,7 @@ Installation directories: --datadir=DIR directory for installing machine independent data files (skins, etc) [PREFIX/share/mpv] --mandir=DIR directory for installing man pages [PREFIX/share/man] + --docdir=DIR directory for installing other docs [PREFIX/share/doc] --confdir=DIR directory for installing configuration files [PREFIX/etc/mpv] --localedir=DIR directory for gettext locales [PREFIX/share/locale] @@ -382,6 +383,7 @@ Miscellaneous options: --enable-static build a statically linked binary --with-install=PATH path to a custom install program --disable-manpage do not build and install manpage [auto] + --disable-pdf do not build and install PDF manual [auto] --disable-build-date do not include binary compile time Advanced options: @@ -495,6 +497,7 @@ _priority=no def_dos_paths="#define HAVE_DOS_PATHS 0" def_priority="#undef CONFIG_PRIORITY" _build_man=auto +_build_pdf=auto _build_date=yes for ac_option do case "$ac_option" in @@ -510,6 +513,9 @@ for ac_option do --mandir=*) _mandir=$(echo $ac_option | cut -d '=' -f 2) ;; + --docdir=*) + _docdir=$(echo $ac_option | cut -d '=' -f 2) + ;; --confdir=*) _confdir=$(echo $ac_option | cut -d '=' -f 2) ;; @@ -721,6 +727,8 @@ for ac_option do --enable-manpage) _build_man=yes ;; --disable-manpage) _build_man=no ;; + --enable-pdf) _build_pdf=yes ;; + --disable-pdf) _build_pdf=no ;; --enable-build-date) _build_date=yes ;; --disable-build-date) _build_date=no ;; @@ -735,6 +743,7 @@ done # Atmos: moved this here, to be correct, if --prefix is specified test -z "$_bindir" && _bindir="$_prefix/bin" test -z "$_mandir" && _mandir="$_prefix/share/man" +test -z "$_docdir" && _docdir="$_prefix/share/doc" test -z "$_confdir" && _confdir="$_prefix/etc/mpv" test -z "$_localedir" && _localedir="$_prefix/share/locale" @@ -928,6 +937,21 @@ else fi echores "$_build_man" +_rst2latex=rst2latex +if [ -f "$(which rst2latex.py)" ] ; then + _rst2latex=rst2latex.py +fi + +echocheck "whether to build manual PDFs with rst2latex" +if test "$_build_pdf" = auto ; then + _build_pdf=no + command_check "$_rst2latex" --version && + command_check pdflatex -version && _build_pdf=yes +else + _build_pdf=no +fi +echores "$_build_pdf" + echocheck "whether to print binary build date" if test "$_build_date" = yes ; then _build_yes=yes @@ -3071,6 +3095,7 @@ CONFIGURATION = $configuration prefix = \$(DESTDIR)$_prefix BINDIR = \$(DESTDIR)$_bindir MANDIR = \$(DESTDIR)$_mandir +DOCDIR = \$(DESTDIR)$_docdir CONFDIR = \$(DESTDIR)$_confdir LOCALEDIR = \$(DESTDIR)$_localedir @@ -3089,6 +3114,8 @@ GETCH = $_getch TIMER = $_timer RST2MAN = $_rst2man BUILD_MAN = $_build_man +RST2LATEX = $_rst2latex +BUILD_PDF = $_build_pdf EXESUF = $_exesuf EXESUFS_ALL = .exe |