Ticket #978: mplayer-xml-docs-build-selected-languages-only-r25563.diff

File mplayer-xml-docs-build-selected-languages-only-r25563.diff, 2.7 KB (added by bugs@…, 18 years ago)

Fixes the issue by generting DOC_LANG in config.mak and using it in DOCS/xml/Makefile

  • configure

     
    26612661_mp_help="help/help_mp-${_language}.h"
    26622662test -f $_mp_help || die "$_mp_help not found"
    26632663for lang in $LANGUAGES ; do
     2664  if test "$lang" = en ; then
     2665    test "$got_en_lang" && continue
     2666    got_en_lang=1
     2667  fi
    26642668  if test -f "DOCS/man/$lang/mplayer.1" ; then
    26652669    MAN_LANG="$lang $MAN_LANG"
    26662670  fi
     2671  if test -f "DOCS/xml/$lang/bugs.xml" ; then
     2672    DOC_LANG="$lang $DOC_LANG"
     2673  fi
    26672674done
    26682675_doc_lang=$_language
    26692676test -d DOCS/xml/$_doc_lang || _doc_lang=en
    2670 echores "using $_language (man pages: $MAN_LANG)"
     2677echores "using $_language (man pages: $MAN_LANG, documentation: $DOC_LANG)"
    26712678
    26722679
    26732680echocheck "enable sighandler"
     
    75907597
    75917598LANG = C
    75927599MAN_LANG = $MAN_LANG
     7600DOC_LANG = $DOC_LANG
    75937601TARGET_OS = $system_name
    75947602DESTDIR =
    75957603prefix = \$(DESTDIR)$_prefix
  • DOCS/xml/Makefile

     
    11# Makefile for generating the HTML documentation
    22
    3 # List of subdirectories to be processed.
     3# Get the DOC_LANG variable determined by ../../configure
     4include ../../config.mak
     5
     6# List of subdirectories available
    47SUBDIRS = en es fr hu it pl cs de ru zh_CN
    58
    69# Generated chunked HTML files go here.
     
    1417help:
    1518        @echo "Targets:"
    1619        @echo "********"
    17         @echo "all               : Build everything (default)."
    18         @echo "html-single       : Build HTML documentation (single file)."
     20        @echo "all               : Build everything for configured languages (default)."
     21        @echo "html-single       : Build HTML documentation for conf. lang. (single file)."
    1922        @echo "html-single-LANG  : As above, but only one language."
    20         @echo "html-chunked      : Build HTML documentation (multiple files)."
     23        @echo "html-chunked      : Build HTML documentation for conf. lang. (multiple files)."
    2124        @echo "html-chunked-LANG : As above, but only one language."
    2225        @echo "xmllint           : Check syntax of all xml files."
    2326        @echo "xmllint-LANG      : Check syntax of LANG xml files."
     
    3134        @echo "distclean-LANG    : Remove ALL generated files for one language."
    3235        @echo "Substitute LANG for one of $(SUBDIRS)"
    3336
    34 html-chunked: xsltproc.sh xmllint.sh chunked-dir $(addprefix html-chunked-,$(SUBDIRS))
     37html-chunked: xsltproc.sh xmllint.sh chunked-dir $(addprefix html-chunked-,$(DOC_LANG))
    3538chunked-dir:
    3639        -mkdir -p $(HTML_CHUNKED)
    3740
    38 html-single: xsltproc.sh xmllint.sh single-dir $(addprefix html-single-,$(SUBDIRS))
     41html-single: xsltproc.sh xmllint.sh single-dir $(addprefix html-single-,$(DOC_LANG))
    3942single-dir:
    4043        -mkdir -p $(HTML_SINGLE)
    4144