X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Ftexinfo-vars.make;h=7cd0e0fce581887ec9e9b804fb9df02611480650;hb=8211950f0931c4d8a0e18ee9e436e489bd583dbd;hp=1a67332d4bdcca35adc0c8ba8870d6611bc005d9;hpb=bb7cab2aa07a49db5d2e126e67b4e2e8ac8007d9;p=lilypond.git diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index 1a67332d4b..7cd0e0fce5 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -1,36 +1,69 @@ TEXI_FILES = $(call src-wildcard,*.texi) - ALL_SOURCES += $(TEXI_FILES) - TEXINFO_SOURCES = $(TEXI_FILES) OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) -GENERATE_OMF = $(PYTHON) $(buildscript-dir)/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ +OMF_FILES += $(foreach format, html pdf, $(foreach f, $(TEXI_FILES), $(outdir)/$(f:.texi=.$(format)).omf)) + +GENERATE_OMF = $(buildscript-dir)/texi2omf --format $(1) --location $(webdir)$(tree-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ + +# Find the file $(1) within the texinfo include dirs and return its path. +# If not found, return $(outdir)/$(1) assuming that it is a generated file. +find-texi = \ +$(firstword \ + $(wildcard $(src-dir)/$(1)) \ + $(wildcard $(top-src-dir)/Documentation/$(1)) \ + $(outdir)/$(1) \ +) + +# 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 test -f $(1) && sed -ne "/^@\(verbatim\)\?include[[:space:]]/s/@\(verbatim\)\?include//p" $(1)), \ + $(call find-texi,$(f)) \ + $(call scan-texi,$(call find-texi,$(f))) \ +) + +# Find dependencies for the target $@, based on the texinfo source file $<, +# and write the dependencies to a .dep file. +DO_TEXI_DEP = ( echo ./$@: $(call scan-texi,$<) > $(basename $@).dep ) && TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper) -MAKEINFO_FLAGS = --enable-encoding +MAKEINFO_FLAGS += --enable-encoding --error-limit=0 $(DOCUMENTATION_INCLUDES) MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS) # texi2html xref map files -XREF_MAPS_DIR=$(top-build-dir)/out/xref-maps -XREF_MAPS_FILES=$(INFO_DOCS:%=$(XREF_MAPS_DIR)/%.xref-map) +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) -# texi2html flags -ifneq ($(ISOLANG),) -TEXI2HTML_LANG = --lang=$(ISOLANG) +########### +ifneq ($(ISOLANG),) +TEXI2HTML_LANG = --document-language=$(ISOLANG) endif -TEXI2HTML_FLAGS += --css-ref=lilypond.css $(DOCUMENTATION_INCLUDES) \ - --I=$(XREF_MAPS_DIR) -TEXI2HTML_INIT = --init-file=$(top-src-dir)/lilypond-texi2html.init -TEXI2HTML = $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS) $(TEXI2HTML_LANG) -TEXI2PDF_FLAGS += -q +TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init + +TEXI2HTML_SPLIT = --prefix=index --split=section + +TEXI2HTML_INCLUDES += --I=$(src-dir) --I=$(outdir) $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR) +TEXI2HTML_FLAGS += --error-limit=0 $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG) +TEXI2HTML = TOP_SRC_DIR=$(top-src-dir) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) +########### + +TEXI2PDF_FLAGS += $(DOCUMENTATION_INCLUDES) # info stuff INFO_INSTALL_FILES = $(wildcard $(addsuffix *, $(INFO_FILES))) -INFO_INSTALL_COMMAND =$(if $(INFO_INSTALL_FILES),\ +INFO_INSTALL_COMMAND = $(if $(INFO_INSTALL_FILES),\ $(INSTALLPY) -d $(DESTDIR)$(infodir) ; \ $(MAKE) INSTALLATION_OUT_DIR=$(infodir) \ depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_INSTALL_FILES)" \