]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/texinfo-vars.make
Build: Also track verbatiminclude'd files (issue 3594).
[lilypond.git] / stepmake / stepmake / texinfo-vars.make
index 28a48b94aa2b2a74af345f5046b7ce6b111eba8e..20170d33b3e149451822e0af17d2a6fba0d2c887 100644 (file)
@@ -17,10 +17,10 @@ $(firstword \
        $(outdir)/$(1) \
 )
 
-# Recursively scan the file $(1) for @include, search for included files
-# within the texinfo include dirs, and return all dependencies.
+# Recursively scan the file $(1) for @include and @verbatiminclude, search for
+# included files within the texinfo include dirs, and return all dependencies.
 scan-texi = \
-$(foreach f, $(shell sed -ne "/^@include[[:space:]]/s/@include//p" $(1)), \
+$(foreach f, $(shell test -f $(1) && sed -ne "/^@\(verbatim\)\?include[[:space:]]/s/@\(verbatim\)\?include//p" $(1)), \
        $(call find-texi,$(f)) \
        $(call scan-texi,$(call find-texi,$(f))) \
 )
@@ -31,16 +31,18 @@ DO_TEXI_DEP = ( echo ./$@: $(call scan-texi,$<) > $(basename $@).dep ) &&
 
 TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
 
-DOCUMENTATION_INCLUDES += -I $(top-src-dir)/Documentation
-
-MAKEINFO_FLAGS += --enable-encoding $(DOCUMENTATION_INCLUDES)
+MAKEINFO_FLAGS += --enable-encoding --error-limit=0 $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
-# FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
 XREF_MAPS_DIR = $(top-build-dir)/$(outdir)/xref-maps
+ifneq ($(ISOLANG),)
+XREF_MAPS_FILES += $(TEXI_FILES:%.texi=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map) \
+ $(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
+else
 XREF_MAPS_FILES += $(TEXI_FILES:%.texi=$(XREF_MAPS_DIR)/%.xref-map) \
  $(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.xref-map)
+endif
 XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
 
 ###########
@@ -53,7 +55,7 @@ TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.ini
 TEXI2HTML_SPLIT = --prefix=index --split=section
 
 TEXI2HTML_INCLUDES += --I=$(src-dir) --I=$(outdir) $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
-TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
+TEXI2HTML_FLAGS += --error-limit=0 $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
 TEXI2HTML = TOP_SRC_DIR=$(top-src-dir) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
 ###########