Fix out-of-tree build of localized docs

Closes #5067
This commit is contained in:
Sandro Santilli 2022-01-29 13:35:39 +01:00
parent ff06be517b
commit 98c1ed850a
22 changed files with 67 additions and 45 deletions

1
.gitignore vendored
View file

@ -31,6 +31,7 @@ doc/Makefile
doc/Makefile.comments
doc/po/*/*.xml
doc/po/*/html
doc/po/*/Makefile
doc/po/*/xsl
doc/po/*/*_comments.sql
doc/postgis_aggs_mm.xml

View file

@ -1689,6 +1689,15 @@ dnl ===========================================================================
dnl Output the relevant files
dnl ===========================================================================
TRANSLATIONS_MAKEFILE_LIST=`grep 'translations = ' ${srcdir}/doc/Makefile.in \
| cut -d= -f2 \
| tr ' ' '\n' \
| grep -v '^ *$' \
| sed 's|^|doc/po/|;s|$|/Makefile|'
`
dnl echo "TRANSLATIONS_MAKEFILE_LIST: ${TRANSLATIONS_MAKEFILE_LIST}"
AC_CONFIG_FILES([GNUmakefile
extensions/Makefile
extensions/postgis/Makefile
@ -1717,6 +1726,7 @@ AC_CONFIG_FILES([GNUmakefile
regress/loader/Makefile
doc/Makefile
doc/Makefile.comments
$TRANSLATIONS_MAKEFILE_LIST
doc/html/image_src/Makefile
utils/Makefile
$RT_MAKEFILE_LIST

View file

@ -220,39 +220,39 @@ endif
ifeq ($(XSLTPROC),)
postgis_aggs_mm.xml: requirements_not_met_xsltproc
else
postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl Makefile postgis-out.xml $(XML_SOURCES)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/postgis_aggs_mm.xml.xsl postgis-out.xml > $@
postgis_aggs_mm.xml: xsl/postgis_aggs_mm.xml.xsl Makefile postgis-out.xml $(XML_SOURCES)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
endif
postgis_comments.sql: ./xsl/postgis_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/postgis_comments.sql.xsl postgis-out.xml > $@
postgis_comments.sql: xsl/postgis_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
postgis_cheatsheet.html: ./xsl/postgis_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/postgis_cheatsheet.html.xsl postgis-out.xml > $@
postgis_cheatsheet.html: xsl/postgis_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
raster_comments.sql: ./xsl/raster_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/raster_comments.sql.xsl postgis-out.xml > $@
raster_comments.sql: xsl/raster_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
raster_cheatsheet.html: ./xsl/raster_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/raster_cheatsheet.html.xsl postgis-out.xml > $@
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
topology_comments.sql: ./xsl/topology_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/topology_comments.sql.xsl postgis-out.xml > $@
topology_comments.sql: xsl/topology_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
topology_cheatsheet.html: ./xsl/topology_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/topology_cheatsheet.html.xsl postgis-out.xml > $@
topology_cheatsheet.html: xsl/topology_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
sfcgal_comments.sql: ./xsl/sfcgal_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/sfcgal_comments.sql.xsl postgis-out.xml > $@
sfcgal_comments.sql: xsl/sfcgal_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
sfcgal_cheatsheet.html: ./xsl/sfcgal_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/sfcgal_cheatsheet.html.xsl postgis-out.xml > $@
sfcgal_cheatsheet.html: xsl/sfcgal_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
tiger_geocoder_comments.sql: ./xsl/tiger_geocoder_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/tiger_geocoder_comments.sql.xsl postgis-out.xml > $@
tiger_geocoder_comments.sql: xsl/tiger_geocoder_comments.sql.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
tiger_geocoder_cheatsheet.html: ./xsl/tiger_geocoder_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $(srcdir)/xsl/tiger_geocoder_cheatsheet.html.xsl postgis-out.xml > $@
tiger_geocoder_cheatsheet.html: xsl/tiger_geocoder_cheatsheet.html.xsl $(XML_INPUTS)
$(XSLTPROC) --novalid --path $(srcdir) $< postgis-out.xml > $@
postgis-out.xml: postgis.xml Makefile
$(PERL) -lpe "s'@@LAST_RELEASE_VERSION@@'${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}'g;s'@@POSTGIS_DOWNLOAD_URL@@'${POSTGIS_DOWNLOAD_URL}'g;" $< > $@
@ -280,7 +280,6 @@ chunked-html-web-mobile: postgis-out.xml Makefile images $(XML_INPUTS)
$<
$(PERL) -pi -e 's/<head>/<head><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">/g' $(HTML_BITS)
html: html/postgis$(DOCSUFFIX).html
html-localized:
@ -360,6 +359,9 @@ clean:
distclean: clean
$(MAKE) -C html/image_src distclean
rm -f Makefile Makefile.comments html/image_src/Makefile
for lang in $(translations); do \
rm -f po/$$lang/Makefile; \
done
maintainer-clean: clean images-clean
rm -f postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql sfcgal_comments.sql
@ -438,7 +440,7 @@ endif
check-localized:
@for lang in $(translations); do \
echo "Creating html for language $$lang..."; \
$(MAKE) -C po/$$lang local-check; \
$(MAKE) -C po/$$lang local-check || exit 1; \
done

View file

@ -1,5 +1,5 @@
# This file should be included by the Makefile
# in each language directory
# This file should be installed in each
# language directory
local-all: local-html comments
@ -14,7 +14,7 @@ local-check: symlinks
symlinks:
rm -f html; ln -s ../../html html
rm -f xsl; ln -s ../../xsl xsl
rm -f xsl; ln -s $(srcdir)/../../xsl xsl
# for XML_SOURCES
include ../../Makefile
@ -23,5 +23,5 @@ include ../../Makefile
PO2XML=po2xml
$(XML_SOURCES): %.xml: %.xml.po
$(PO2XML) ../../$@ $< > $@
$(PO2XML) $(srcdir)/../../$@ $< > $@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-de
include ../Makefile.local

3
doc/po/de/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-de
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-es
include ../Makefile.local

3
doc/po/es/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-es
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-fr
include ../Makefile.local

3
doc/po/fr/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-fr
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-it
include ../Makefile.local

3
doc/po/it_IT/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-it
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-ja
include ../Makefile.local

3
doc/po/ja/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-ja
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-ko_KR
include ../Makefile.local

3
doc/po/ko_KR/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-ko_KR
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-pl
include ../Makefile.local

3
doc/po/pl/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-pl
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-br
include ../Makefile.local

3
doc/po/pt_BR/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-br
include @srcdir@/../Makefile.local
srcdir=@srcdir@

View file

@ -1,2 +0,0 @@
DOCSUFFIX=-ru
include ../Makefile.local

3
doc/po/ru/Makefile.in Normal file
View file

@ -0,0 +1,3 @@
DOCSUFFIX=-ru
include @srcdir@/../Makefile.local
srcdir=@srcdir@