]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/doc-i18n-root-vars.make
Merge branch 'lilypond/translation' into staging
[lilypond.git] / make / doc-i18n-root-vars.make
index 5eaa432110066fbd57c1d383b92efa5895e29a6a..8c20f494bde0106e624edd30e2a9c140267dcd84 100644 (file)
@@ -1,27 +1,32 @@
-HTML_PAGE_NAMES = index translations
-HTML_FILES = $(HTML_PAGE_NAMES:%=%.html)
-OUT_HTML_FILES = $(HTML_PAGE_NAMES:%=$(outdir)/%.html)
-
 # ISOLANG must be defined
 
-LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
-
-CSS_SOURCE_FILES = $(shell ls $(top-src-dir)/Documentation/lilypond*.css)
-SOURCE_PNG_IMAGES = $(shell ls $(top-src-dir)/Documentation/*.png)
-OUT_PNG_IMAGES = \
-  $(SOURCE_PNG_IMAGES:$(top-src-dir)/Documentation/%.png=$(outdir)/%.png) \
-  $(outdir)/context-example.png
+LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
 
 TELY_FILES := $(call src-wildcard,*.tely)
-MASTER_TEXI_FILES := $(TELY_FILES:%.tely=$(outdir)/%.texi)
-BIG_PAGE_HTML_FILES := $(TELY_FILES:%.tely=$(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html)
-DEEP_HTML_FILES := $(TELY_FILES:%.tely=$(top-build-dir)/Documentation/$(outdir)/%/index.$(ISOLANG).html)
+TEXI_FILES := $(call src-wildcard,*.texi)
+MASTER_TEXI_FILES := $(TEXI_FILES) $(TELY_FILES:%.tely=$(outdir)/%.texi)
+
+TEXINFO_MANUALS =\
+ $(TELY_FILES:%.tely=%)\
+ $(TEXI_FILES:%.texi=%)
+
+TOPDIR_HTML_MANUALS = 
+SPLIT_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
+ $(if $(findstring $(manual), $(UNSPLIT_HTML_MANUALS)),,$(manual)))
+NOT_TOPDIR_HTML_MANUALS = $(foreach manual, $(SPLIT_HTML_MANUALS),\
+ $(if $(findstring $(manual), $(TOPDIR_HTML_MANUALS)),,$(manual)))
+
+OUT_HTML_FILES += $(UNSPLIT_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).html) \
+ $(TOPDIR_HTML_MANUALS:%=$(outdir)/index.$(ISOLANG).html)
+BIG_PAGE_HTML_FILES := $(SPLIT_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html)
+DEEP_HTML_FILES := $(NOT_TOPDIR_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%/index.$(ISOLANG).html)
 PDF_FILES := $(TELY_FILES:%.tely=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).pdf)
 
 ITELY_FILES := $(call src-wildcard,*.itely)
 ITEXI_FILES := $(call src-wildcard,*.itexi)
 
 DOCUMENTATION_INCLUDES = \
+  -I $(top-src-dir)/Documentation/$(ISOLANG)/included \
   -I $(top-src-dir)/Documentation \
   -I $(top-build-dir)/Documentation/$(outdir)
 
@@ -30,18 +35,32 @@ MAKEINFO_FLAGS += --force --enable-encoding $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
-XREF_MAPS_DIR=$(top-build-dir)/out/xref-maps
-XREF_MAPS_FILES=$(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
-XREF_MAP_FLAGS += -I $(outdir)
+# FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
+XREF_MAPS_DIR=$(top-build-dir)/$(outdir)/xref-maps
+XREF_MAPS_FILES=$(TEXINFO_MANUALS:%=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
+XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
+
+WEB_MANUALS=web
+
+###########
+ifneq ($(ISOLANG),)
+TEXI2HTML_LANG = --lang=$(ISOLANG)
+endif
+
+$(XREF_MAPS_DIR)/web.$(ISOLANG).xref-map:\
+       XREF_MAP_FLAGS += --split=node
+
+TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+
+TEXI2HTML_SPLIT = --prefix=index --split=section
 
-# texi2html flags
-TEXI2HTML_INIT= --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
-TEXI2HTML_LANG=--lang=$(ISOLANG)
-TEXI2HTML_FLAGS += $(TEXI2HTML_LANG) $(DOCUMENTATION_INCLUDES) \
-  -I $(XREF_MAPS_DIR)
-TEXI2HTML = PERL_UNICODE=SD LANG= $(TEXI2HTML_PROGRAM)
+TEXI2HTML_INCLUDES += --I=. --I=$(src-dir) --I=$(outdir) $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
+TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_LANG) $(TEXI2HTML_INIT) 
+TEXI2HTML = TOP_SRC_DIR=$(top-src-dir) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
+###########
 
 TEXI2PDF_FLAGS += --batch $(DOCUMENTATION_INCLUDES)
+TEXI2PDF_FLAGS += -I $(LYS_OUTPUT_DIR)
 
 ifdef QUIET_BUILD
 TEXI2PDF_FLAGS += -q