summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-14 00:43:55 +0100
committerwm4 <wm4@nowhere>2012-11-14 11:26:43 +0100
commit94fc9f75584dad8a9aaef7a441ddf946c56bb311 (patch)
tree9acfb67499a6059c42f3924968c448208cf1868f /configure
parent1b8ef407ebd41ea94f8ee003ee685c8b86f9b35c (diff)
downloadmpv-94fc9f75584dad8a9aaef7a441ddf946c56bb311.tar.bz2
mpv-94fc9f75584dad8a9aaef7a441ddf946c56bb311.tar.xz
build: build manpage by default if rst2man is detected
Add building the manpage to the all target (which is also the default target). This fixes the behavior that "make install" tried to build the manpage if it wasn't built yet. Add rst2man detection to configure, and disable rst2man usage in the all and install targets if it hasn't been found. You can still build or install the man page manually (by using the install-mpv-man target), but the all and install targets won't attempt to use rst2man. Additionally, building/installing the manpage by default can be explicitly inhibited using the --disable-manpage configure option. It's possible to avoid rst2man by using "make mpv install-no-man" as well.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index e494d8df59..e6ead21ef0 100755
--- a/configure
+++ b/configure
@@ -382,6 +382,7 @@ Miscellaneous options:
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
--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]
Advanced options:
--enable-shm enable shm [autodetect]
@@ -499,6 +500,7 @@ def_stream_cache="#define CONFIG_STREAM_CACHE 1"
def_priority="#undef CONFIG_PRIORITY"
def_pthread_cache="#undef PTHREAD_CACHE"
need_shmem=yes
+_build_man=auto
for ac_option do
case "$ac_option" in
--help|-help|-h)
@@ -732,6 +734,9 @@ for ac_option do
--enable-sortsub) _sortsub=yes ;;
--disable-sortsub) _sortsub=no ;;
+ --enable-manpage) _build_man=yes ;;
+ --disable-manpage) _build_man=no ;;
+
*)
echo "Unknown parameter: $ac_option" >&2
exit 1
@@ -917,6 +922,16 @@ if [ -f "$(which rst2man.py)" ] ; then
_rst2man=rst2man.py
fi
+echocheck "whether to build manpages with rst2man"
+if test "$_build_man" = auto ; then
+ _build_man=no
+ command_check "$_rst2man" --version && _build_man=yes
+else
+ _build_man=no
+fi
+echores "$_build_man"
+
+
TMPC="$mplayer_tmpdir/tmp.c"
TMPCPP="$mplayer_tmpdir/tmp.cpp"
TMPEXE="$mplayer_tmpdir/tmp$_exesuf"
@@ -3228,6 +3243,7 @@ EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs $libs_mplaye
GETCH = $_getch
TIMER = $_timer
RST2MAN = $_rst2man
+BUILD_MAN = $_build_man
EXESUF = $_exesuf
EXESUFS_ALL = .exe