Ticket #1200: Makefile.patch

File Makefile.patch, 2.4 KB (added by fgdrf, 7 years ago)
  • Makefile

     
    1111LANGUAGES     = en $(TRANSLATIONS)
    1212PDF_LANG      = en
    1313START_DIR     = $(shell pwd)
     14ORIGIN_FILES  = $(shell find ./en -name "*.rst" -print)
    1415
    1516# Internal variables.
    1617PAPEROPT_a4     = -D latex_paper_size=a4
     
    4445        # For quickstart, standards and overview docs which have not been
    4546        # translated, link to english doc
    4647        for LANG in $(TRANSLATIONS) ; do \
    47           for DOC in en/*/* ; do \
     48          for DOC in $(ORIGIN_FILES) ; do \
    4849            TRANSLATED_DOC=`echo $$DOC | sed -e"s/en/$$LANG/"` ; \
    4950            TARGET_EN=`echo $$DOC | sed -e"s#^#../../#"` ; \
    5051            if [ ! -f $$TRANSLATED_DOC ] ; then \
     
    5354            fi ; \
    5455          done ; \
    5556        done
    56         # link to english docs for the docs in head directory
    57         for LANG in $(TRANSLATIONS) ; do \
    58           for DOC in en/download.rst en/contact.rst en/index.rst en/sponsors.rst en/sponsors_osgeo.rst en/disclaimer.rst en/presentation.rst en/copyright.rst ; do \
    59             TRANSLATED_DOC=`echo $$DOC | sed -e"s/en/$$LANG/"` ; \
    60             TARGET_EN=`echo $$DOC | sed -e"s#^#../#"` ; \
    61             if [ ! -f $$TRANSLATED_DOC ] ; then \
    62               rm -f $$TRANSLATED_DOC ; \
    63               ln -s $$TARGET_EN $$TRANSLATED_DOC ; \
    64             fi ; \
    65           done ; \
    66         done
    6757
    6858sphinxbuild: link_to_en_docs licenses.csv
    6959        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
     
    170160        # For quickstart, standards and overview docs which have not been
    171161        # translated, link to english doc
    172162        for LANG in $(PDF_LANG) ; do \
    173           for DOC in en/*/* ; do \
     163          for DOC in $(ORIGIN_FILES) ; do \
    174164            TRANSLATED_DOC=`echo $$DOC | sed -e"s/en/$$LANG/"` ; \
    175165            TARGET_EN=`echo $$DOC | sed -e"s#^#../../#"` ; \
    176166            if [ ! -f $$TRANSLATED_DOC ] ; then \
     
    179169            fi ; \
    180170          done ; \
    181171        done
    182         # link to english docs for the docs in head directory
    183         for LANG in $(PDF_LANG) ; do \
    184           for DOC in en/download.rst en/contact.rst en/index.rst en/sponsors.rst en/sponsors_osgeo.rst en/disclaimer.rst en/presentation.rst en/copyright.rst ; do \
    185             TRANSLATED_DOC=`echo $$DOC | sed -e"s/en/$$LANG/"` ; \
    186             TARGET_EN=`echo $$DOC | sed -e"s#^#../#"` ; \
    187             if [ ! -f $$TRANSLATED_DOC ] ; then \
    188               rm -f $$TRANSLATED_DOC ; \
    189               ln -s $$TARGET_EN $$TRANSLATED_DOC ; \
    190             fi ; \
    191           done ; \
    192         done
    193172
    194173fix_index_pdf:
    195174        for LANG in $(PDF_LANG) ; do \