[MPlayer-dev-eng] [PATCH] Installing docs/manpage during make install

sr seru at gmx.net
Sat Jan 4 17:55:08 CET 2003


Updated the patch so it can be applied to current cvs and did some further fixes.
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.241
diff -u -r1.241 Makefile
--- Makefile	27 Dec 2002 16:02:44 -0000	1.241
+++ Makefile	4 Jan 2003 16:51:48 -0000
@@ -246,43 +246,118 @@
 ifeq ($(SHARED_PP),yes)
 	$(MAKE) install -C postproc 
 endif
-	if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi
+# Install binary
+	$(INSTALL) -m 755 -d $(BINDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG) $(BINDIR)/$(PRG)
+ifeq ($(MENCODER),yes)
+	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
+endif
 ifeq ($(GUI),yes)
 	-ln -sf $(PRG) $(BINDIR)/gmplayer
 endif
-	if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
+# Install manpages
+	$(INSTALL) -m 755 -d $(MANDIR)/de
+	$(INSTALL) -m 755 -d $(MANDIR)/fr
+	$(INSTALL) -m 755 -d $(MANDIR)/pl
+	$(INSTALL) -m 755 -d $(MANDIR)/hu
+	$(INSTALL) -m 755 -d $(MANDIR)/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/de/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/fr/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/hu/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/pl/man1
 	$(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
-ifeq ($(MENCODER),yes)
-	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
-	-ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1
-endif
-	@if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
-	@if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi
+	$(INSTALL) -c -m 644 DOCS/German/mplayer.1 $(MANDIR)/de/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/French/mplayer.1 $(MANDIR)/fr/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/Hungrian/mplayer.1 $(MANDIR)/hu/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/Polish/mplayer.1 $(MANDIR)/pl/man1/mplayer.1
+	echo ".so mplayer.1" > DOCS/mencoder.1
+	$(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/man1
+	$(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/de/man1
+	$(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/fr/man1
+	$(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/hu/man1
+	$(INSTALL) -c -m 644 DOCS/mencoder.1 $(MANDIR)/pl/man1
+# Install html and tech docs
+	$(INSTALL) -m 755 -d $(DOCSDIR)
+ifeq($(INSTALL_DOCS_EN),yes)
+	for en_docs in DOCS/*.html; do \
+		$(INSTALL) -m 644 $$en_docs $(DOCSDIR); \
+	done  
+endif
+ifeq($(INSTALL_DOCS_CN),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Chinese
+	for cn_docs in DOCS/Chinese/*.html; do \
+                $(INSTALL) -m 644 $$cn_docs $(DOCSDIR)/Chinese; \
+	 done
+endif
+ifeq($(INSTALL_DOCS_DE),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/German
+	for cn_docs in DOCS/German/*.html; do \
+                $(INSTALL) -m 644 $$de_docs $(DOCSDIR)/German; \
+        done
+endif
+ifeq($(INSTALL_DOCS_FR),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/French
+	for cn_docs in DOCS/French/*.html; do \
+                $(INSTALL) -m 644 $$fr_docs $(DOCSDIR)/French; \
+        done
+endif
+ifeq($(INSTALL_DOCS_HU),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Hungrian
+	for hu_docs in DOCS/Hungrian/*.html; do \
+                $(INSTALL) -m 644 $$hu_docs $(DOCSDIR)/Hungrian; \
+        done
+endif
+ifeq($(INSTALL_DOCS_IT),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Italian
+	for it_docs in DOCS/Italian/*.html; do \
+                $(INSTALL) -m 644 $$it_docs $(DOCSDIR)/Italian; \
+        done
+endif
+ifeq($(INSTALL_DOCS_PL),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Polish
+	for pl_docs in DOCS/Polish/*.html; do \
+                $(INSTALL) -m 644 $$pl_docs $(DOCSDIR)/Polish; \
+        done
+endif
+	$(INSTALL) -m 755 -d $(DOCSDIR)/tech
+	$(INSTALL) -m 755 -d $(DOCSDIR)/tech/realcodecs
+	for techdocs in `find DOCS/tech/ -type f -maxdepth 1`; do \
+               $(INSTALL) -m 644 $$techdocs $(DOCSDIR)/tech; \
+	done
+	for realcodecs in `find DOCS/tech/realcodecs -type f -maxdepth 1`; do \
+               $(INSTALL) -m 644 $$realcodecs $(DOCSDIR)/tech/realcodecs; \
+	done
+	@echo "*** Installed documentation to $(DOCSDIR)"
+# Install fonts, skins
+	$(INSTALL) -m 755 -d $(DATADIR)
+	$(INSTALL) -m 755 -d $(DATADIR)/font
 	@if test ! -f $(DATADIR)/font/font.desc ; then \
 	echo "*** Download font at http://www.mplayerhq.hu/homepage/dload.html" ; \
 	echo "*** for OSD/Subtitles support and extract to $(DATADIR)/font/" ; \
 	fi
 ifeq ($(GUI),yes)
-	@if test ! -d $(DATADIR)/Skin ; then mkdir -p $(DATADIR)/Skin ; fi
+	$(INSTALL) -m 755 -d $(DATADIR)/Skin
 	@echo "*** Download skin(s) at http://www.mplayerhq.hu/homepage/dload.html"
 	@echo "*** for GUI, and extract to $(DATADIR)/Skin/"
 endif
-	@if test ! -d $(CONFDIR) ; then mkdir -p $(CONFDIR) ; fi
+# Install codecs
+	$(INSTALL) -m 755 -d $(CONFDIR)
 	@if test -f $(CONFDIR)/codecs.conf.old ; then mv -f $(CONFDIR)/codecs.conf.old $(CONFDIR)/codecs.conf.older ; fi
 	@if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
 	$(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf
+# Install libmpdvdkit
 ifeq ($(DVDKIT_SHARED),yes)
 ifeq ($(DVDKIT2),yes)
-	if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
+	$(INSTALL) -m 755 -d $(LIBDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit2/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
 else
 ifeq ($(DVDKIT),yes)
-	if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
+	$(INSTALL) -m 755 -d $(LIBDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
 endif
 endif
 endif
+# Install fibmap_mplayer
 ifeq ($(CSS_USE),yes)
 	@echo "The following task requires root privileges. If it fails don't panic,"
 	@echo "however it means you can't use fibmap_mplayer."
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.632
diff -u -r1.632 configure
--- configure	4 Jan 2003 02:40:49 -0000	1.632
+++ configure	4 Jan 2003 16:52:03 -0000
@@ -106,6 +106,7 @@
 esac
 
 LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s/help\/help_mp-\(..\).h/\1/g" |sed "s/help\/help_mp-\(.....\).h/\1/g"`
+DOCS_LANGUAGES_DEFAULT="de,en,fr,hu,it,pl,zh_CN"
 
 for parm in "$@" ; do
   if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
@@ -124,8 +125,10 @@
                          data files (fonts, skins) [PREFIX/share/mplayer]
   --mandir=DIR           use this prefix for installing manpages [PREFIX/man]
   --confdir=DIR          use this prefix for installing configuration files
-                         [same as datadir]
+                         [PREFIX/share/mplayer]
   --libdir=DIR           use this prefix for object code libraries [PREFIX/lib]
+  --docsdir=DIR          use this prefix for installing the documentation 
+                         [PREFIX/doc/mplayer]
 
 Optional features:
   --disable-mencoder     disable mencoder (a/v encoder) compilation [enable]
@@ -225,6 +228,8 @@
                          options with --enable-static="-lslang -lncurses"
   --language=xx          select a language (for translated messages/gui) [en]
                          (Available: $LANGUAGES)
+  --docs-languages=xx    select html docs to be installed 
+                         [$DOCS_LANGUAGES_DEFAULT]
   --enable-shared-pp     install & use shared postprocessing lib
   --install-path=PATH    the path to a custom install program (useful if
                          your OS uses a GNU-incompatible install utility by
@@ -1025,6 +1030,7 @@
 _bl=no
 _largefiles=no
 _language=en
+_docs_languages=$DOCS_LANGUAGES_DEFAULT
 _shm=auto
 _linux_devfs=no
 _i18n=auto
@@ -1246,6 +1252,9 @@
   --language=*)
     LINGUAS=`echo $ac_option | cut -d '=' -f 2`
     ;;
+  --docs-languages=*)
+    DOCS_INSTALL=`echo $ac_option | cut -d '=' -f 2`
+    ;;
   --with-libdvdnav=*)
     _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
     _dvdnav=yes
@@ -1391,6 +1400,7 @@
 test -z "$_mandir" && _mandir="$_prefix/man"
 test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
 test -z "$_libdir" && _libdir="$_prefix/lib"
+test -z "$_docsdir" && _docsdir="$_prefix/doc/mplayer"
 test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
 
 if x86 ; then
@@ -1558,7 +1568,6 @@
 fi
 echores "$_i18n"
 
-
 # Checking for setlocale() ...
 # CSAK EGY MARADHAT - A HEGYLAKO
 # Nemnem. a TV Maci !
@@ -1578,7 +1587,6 @@
 fi
 echores "$_setlocale"
 
-
 echocheck "language"
 test -z "$LINGUAS" && LINGUAS="en"
 if test -f "help/help_mp-${LINGUAS}.h" ; then
@@ -1590,6 +1598,44 @@
 _mp_help="help/help_mp-${LINGUAS}.h"
 test -f $_mp_help || die "$_mp_help not found"
 
+echocheck "html docs"
+if test "`echo $DOCS_INSTALL | grep zh_CN`" ; then
+ _install_docs_cn=yes
+else
+ _install_docs_cn=no
+fi
+if test "`echo $DOCS_INSTALL | grep en`" ; then
+ _install_docs_en=yes
+else
+ _install_docs_en=no
+fi
+if test "`echo $DOCS_INSTALL | grep de`" ; then
+ _install_docs_de=yes
+else
+ _install_docs_de=no
+fi
+if test "`echo $DOCS_INSTALL | grep fr`" ; then
+ _install_docs_fr=yes
+else
+ _install_docs_rf=no
+fi
+if test "`echo $DOCS_INSTALL | grep hu`" ; then
+ _install_docs_hu=yes
+else
+ _install_docs_hu=no
+fi
+if test "`echo $DOCS_INSTALL | grep it`" ; then
+ _install_docs_it=yes
+else
+ _install_docs_it=no
+fi
+if test "`echo $DOCS_INSTALL | grep pl`" ; then
+ _install_docs_pl=yes
+else
+ _install_docs_pl=no
+fi
+echores "using ${DOCS_INSTALL}"
+
 echocheck "enable sighandler"
 if test "$_sighandler" = yes ; then
   _def_sighandler='#define ENABLE_SIGHANDLER 1'
@@ -4727,6 +4773,7 @@
 MANDIR = \$(DESTDIR)$_mandir
 CONFDIR = \$(DESTDIR)$_confdir
 LIBDIR = \$(DESTDIR)$_libdir
+DOCSDIR = \$(DESTDIR)$_docsdir
 #AR = ar
 CC = $_cc
 AWK = $_awk
@@ -4847,6 +4894,15 @@
 GTK_LIBS =  $_ld_static $_ld_gui
 GUI = $_gui
 DEBUG = -DDEBUG
+
+# --- Install international HTML docs ---
+INSTALL_DOCS_CN = $_install_docs_cn
+INSTALL_DOCS_DE = $_install_docs_de
+INSTALL_DOCS_EN = $_install_docs_en
+INSTALL_DOCS_FR = $_install_docs_fr
+INSTALL_DOCS_HU = $_install_docs_hu
+INSTALL_DOCS_IT = $_install_docs_it
+INSTALL_DOCS_PL = $_install_docs_pl
 
 EOF
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030104/a6b4a474/attachment.pgp>


More information about the MPlayer-dev-eng mailing list