[MPlayer-dev-eng] Re: install localized manpages +

Andriy N. Gritsenko andrej at lucky.net
Thu Feb 13 18:35:37 CET 2003


    Hi, D Richard Felker III!

Sometime (on Thursday, February 13 at 19:21) I've received something...
>> --------------------------------------------------------------------
>> LINGUAS = 
>> 
>> install-man:
>>     if [ -n "$(LINGUAS)" ]; then
>>         for i in $(LINGUAS); do
>>             mkdir -p $(mandir)/$$i/man1
>>             install -m 644 DOCS/$$i/mplayer.1 $(mandir)/$$i/man1
>>         done
>>     fi
>> --------------------------------------------------------------------

>This is invalid. For loops with no items after in are not valid in
>Bourne shell.

    It's impossible since it's tested (test -n "$(LINGUAS)") and it will
be at least one item. :)

>How about instead of:

>             mkdir -p $(mandir)/$$i/man1
>             install -m 644 DOCS/$$i/mplayer.1 $(mandir)/$$i/man1

>doing:

>             test -d $(mandir)/$$i/man1 && install -m 644 DOCS/$$i/mplayer.1 $(mandir)/$$i/man1

>Then the multi-lingual man pages will get installed only for people
>who already have such a setup on their systems, and only for the
>languages they want.

But if you don't have localized manpages yet (for example, mplayer is
first non-system application that you want install)? As I said before
you can just empty LINGUAS and you will have no localized manpages.

However I forgot about default manpage...

--------------------------------------------------------------------
LINGUAS = 

install-man:
    LINGUAS="`echo $(LINGUAS)|sed 's/en//'|sed 's/^ *\(.*\) *$/\1/'`"
    if [ -n "$$LINGUAS" ]; then
        for i in $$LINGUAS; do
            mkdir -p $(mandir)/$$i/man1
            install -m 644 DOCS/$$i/mplayer.1 $(mandir)/$$i/man1
        done
    fi
    test -d $(mandir)/man1 && install -m 644 DOCS/en/mplayer.1 $(mandir)/man1
--------------------------------------------------------------------

    With best wishes.
    Andriy.


More information about the MPlayer-dev-eng mailing list