From c1ea7b13aea6297018375ed3571753a6c36714ab Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Sun, 1 Jun 2008 15:13:21 +0200 Subject: [PATCH] Split WWW target in two stages WWW-1 and WWW-2 - split local-WWW too in makefiles; - local-WWW-1 generates Texinfo source, and Info and PDF output; local-WWW-2 generates HTML output; - also change WWW-post to a toplevel target, because it needn't recurse into subdirectories. This change allows collecting node trees from all Texinfo sources at the end of local-WWW-1, so they are available to texi2html in local-WWW-2. --- Documentation/GNUmakefile | 2 +- Documentation/bibliography/GNUmakefile | 6 ++--- Documentation/de/GNUmakefile | 2 +- Documentation/es/GNUmakefile | 2 +- Documentation/fr/GNUmakefile | 2 +- Documentation/misc/GNUmakefile | 2 +- Documentation/pictures/GNUmakefile | 3 +-- Documentation/topdocs/GNUmakefile | 3 +++ Documentation/user/GNUmakefile | 16 ++++++------ GNUmakefile.in | 2 +- input/lsr/GNUmakefile | 6 +++-- make/doclang-rules.make | 8 +++--- make/doclang-targets.make | 6 ++++- make/doclang-vars.make | 8 +++--- make/ly-rules.make | 5 +--- make/lysdoc-rules.make | 1 - make/lysdoc-targets.make | 6 ++--- make/lysdoc-vars.make | 2 -- make/mutopia-targets.make | 8 +++--- stepmake/stepmake/documentation-targets.make | 4 --- stepmake/stepmake/generic-targets.make | 26 ++++++++++++++------ stepmake/stepmake/texinfo-targets.make | 2 +- stepmake/stepmake/topdocs-targets.make | 4 ++- 23 files changed, 64 insertions(+), 62 deletions(-) diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 15b6a6f297..15b7601905 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -13,7 +13,7 @@ include $(depth)/make/stepmake.make default: local-doc -local-WWW: txt-to-html $(outdir)/index.html $(outdir)/devel.html +local-WWW-2: txt-to-html $(outdir)/index.html $(outdir)/devel.html local-WWW-clean: deep-WWW-clean diff --git a/Documentation/bibliography/GNUmakefile b/Documentation/bibliography/GNUmakefile index 4a7bab0111..89eb2d0bcb 100644 --- a/Documentation/bibliography/GNUmakefile +++ b/Documentation/bibliography/GNUmakefile @@ -1,4 +1,4 @@ -# Documentation/tex/Makefile +# Documentation/bibliography/Makefile depth=../.. @@ -18,10 +18,10 @@ ps: $(PS_FILES) # urg default: -GENHTMLS = engraving colorado computer-notation +GENHTMLS = engraving colorado computer-notation OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html)) -local-WWW: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html) index.html) +local-WWW-2: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html) index.html) $(outdir)/%.bib: %.bib ln -f $< $@ diff --git a/Documentation/de/GNUmakefile b/Documentation/de/GNUmakefile index eee4de1f51..6c6f34ad9a 100644 --- a/Documentation/de/GNUmakefile +++ b/Documentation/de/GNUmakefile @@ -5,7 +5,7 @@ STEPMAKE_TEMPLATES = documentation include $(depth)/make/stepmake.make -local-WWW: lang-merge +local-WWW-2: lang-merge lang-merge: $(outdir)/index.html ln -f $(outdir)/index.html $(depth)/Documentation/$(outdir)/index.$(ISOLANG).html diff --git a/Documentation/es/GNUmakefile b/Documentation/es/GNUmakefile index bc58051120..71d45d60fa 100644 --- a/Documentation/es/GNUmakefile +++ b/Documentation/es/GNUmakefile @@ -5,7 +5,7 @@ STEPMAKE_TEMPLATES = documentation include $(depth)/make/stepmake.make -local-WWW: lang-merge +local-WWW-2: lang-merge lang-merge: $(outdir)/index.html ln -f $(outdir)/index.html $(depth)/Documentation/$(outdir)/index.$(ISOLANG).html diff --git a/Documentation/fr/GNUmakefile b/Documentation/fr/GNUmakefile index 003d9c02bd..29c968e925 100644 --- a/Documentation/fr/GNUmakefile +++ b/Documentation/fr/GNUmakefile @@ -5,7 +5,7 @@ STEPMAKE_TEMPLATES = documentation include $(depth)/make/stepmake.make -local-WWW: lang-merge +local-WWW-2: lang-merge lang-merge: $(outdir)/index.html ln -f $(outdir)/index.html $(depth)/Documentation/$(outdir)/index.$(ISOLANG).html diff --git a/Documentation/misc/GNUmakefile b/Documentation/misc/GNUmakefile index b84aa786b8..bb3beb4998 100644 --- a/Documentation/misc/GNUmakefile +++ b/Documentation/misc/GNUmakefile @@ -14,7 +14,7 @@ default: local-doc #urg default local-WWW target uses footify before its time; # must add footify with txt-to-html target OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(TEXTS))) -##local-WWW: $(OUT_TXT_FILES) $(OUT_HTMLFILES) txt-to-html +##local-WWW-2: $(OUT_TXT_FILES) $(OUT_HTMLFILES) txt-to-html copy-for-me: $(foreach a, $(README_TOP_FILES), cp ../$(a) $(outdir)/$(a).txt && ) true diff --git a/Documentation/pictures/GNUmakefile b/Documentation/pictures/GNUmakefile index 6665721085..438389f944 100644 --- a/Documentation/pictures/GNUmakefile +++ b/Documentation/pictures/GNUmakefile @@ -21,5 +21,4 @@ endif # PLATFORM_WINDOWS local-dist: $(icon) xgifs: $(OUTGIF_FILES) pngs: $(OUTPNG_FILES) -local-WWW: $(OUTPNG_FILES) - +local-WWW-1: $(OUTPNG_FILES) diff --git a/Documentation/topdocs/GNUmakefile b/Documentation/topdocs/GNUmakefile index 7e2d2641d9..6fd3a7504f 100644 --- a/Documentation/topdocs/GNUmakefile +++ b/Documentation/topdocs/GNUmakefile @@ -3,6 +3,7 @@ depth = ../.. STEPMAKE_TEMPLATES=documentation tex texinfo topdocs LOCALSTEPMAKE_TEMPLATES=lilypond ly +OUT_TEXI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.texi) HTML_FILES=$(TEXI_FILES:%.texi=$(outdir)/%.html) $(TELY_FILES:%.tely=$(outdir)/%.html) PDF_FILES=$(outdir)/NEWS.pdf README_TOP_FILES=NEWS AUTHORS INSTALL README @@ -12,5 +13,7 @@ include $(depth)/make/stepmake.make MAKEINFO_FLAGS += -I $(top-src-dir)/Documentation/user +local-WWW-1: $(OUT_TEXI_FILES) + .SECONDARY: diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index eb4577dcc3..6d887f580e 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -16,6 +16,10 @@ OUT_PNG_IMAGES=$(OUT_PDF_IMAGES:%.pdf=%.png) OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\ $(ITELY_FILES:%.itely=$(outdir)/%.texi) + +MASTER_TEXI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.texi)\ + $(outdir)/lilypond-internals.texi + HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\ $(outdir)/lilypond-internals-big-page.html @@ -63,8 +67,6 @@ extra-local-help: xml update Docbook xml documentation\n\ " -# Generic rule using % twice not possible? -# $(outdir)/%/%.html: $(outdir)/%.texi $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi # @@ -123,8 +125,9 @@ $(outdir)/%/source: mkdir -p $(dir $@) ln -sf $(depth)/.. $(@) -local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\ - $(datafiles) $(PDF_FILES) $(source-links) info +local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) info + +local-WWW-2: $(HTML_FILES) $(DEEP_HTML_FILES) $(source-links) $(outdir)/%.bib: %.bib ln -f $< $@ @@ -146,9 +149,4 @@ $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learn $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY) cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation - -## unused -$(outdir)/interfaces.itexi: dummy - cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc - .SECONDARY: diff --git a/GNUmakefile.in b/GNUmakefile.in index 6da515c15d..ef3f12f25a 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -82,7 +82,7 @@ final-install: # For both online and offline docs, issue `make web WEB_TARGETS="offline online"' WEB_TARGETS = offline -local-WWW-post: +WWW-post: # need UTF8 setting in case this is hosted on a website. echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/ diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index eacbcb9220..f91dacd38d 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -56,8 +56,10 @@ local-uninstall-WWW: local-uninstall-info local-clean: rm -f $(INFO_IMAGES_DIR) -local-WWW: info $(outdir)/lilypond-snippets.pdf \ - $(outdir)/lilypond-snippets/index.html \ +local-WWW-1: info $(outdir)/lilypond-snippets.pdf \ + $(outdir)/lilypond-snippets.texi + +local-WWW-2: $(outdir)/lilypond-snippets/index.html \ $(outdir)/lilypond-snippets-big-page.html \ $(source-links) diff --git a/make/doclang-rules.make b/make/doclang-rules.make index 52e4684391..62321a0d9f 100644 --- a/make/doclang-rules.make +++ b/make/doclang-rules.make @@ -7,7 +7,7 @@ $(outdir)/%-big-page.html: $(outdir)/%.texi $(OUT_PNG_IMAGES) $(outdir)/version. $(TEXI2HTML) --I=$(outdir) $(TEXI2HTML_FLAGS) --output=$@ $(TEXI2HTML_INIT) $< cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@) -$(outdir)/%.pdftexi: $(outdir)/%.texi doc-po $(outdir)/version.itexi +$(outdir)/%.pdftexi: $(outdir)/%.texi $(outdir)/version.itexi $(PYTHON) $(buildscript-dir)/texi-gettext.py $(ISOLANG) $< $(outdir)/%.pdf: $(outdir)/%.pdftexi $(outdir)/version.itexi @@ -23,10 +23,8 @@ $(outdir)/%.png: $(top-build-dir)/Documentation/user/$(outdir)/%.png # This makes sure lilypond-doc gettext domain has been compiled # before lilypond-book runs -%.tely: doc-po +$(TELY_FILES): doc-po -$(OUT_TEXI_FILES): $(ITELY_FILES) $(ITEXI_FILES) - -$(DEEP_HTML_FILES) $(PDF_FILES): $(ITELY_FILES) $(ITEXI_FILES) +$(MASTER_TEXI_FILES): $(ITELY_FILES) $(ITEXI_FILES) .SECONDARY: diff --git a/make/doclang-targets.make b/make/doclang-targets.make index 4fd4bad694..25cea37548 100644 --- a/make/doclang-targets.make +++ b/make/doclang-targets.make @@ -1,10 +1,14 @@ default: +local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) + # BIG_PAGE_HTML_FILES is defined differently in each language makefile -local-WWW: $(DEEP_HTML_FILES) $(PDF_FILES) doc-po $(BIG_PAGE_HTML_FILES) +local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(ISOLANG) find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf) find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) doc-po: $(MAKE) -C $(depth)/Documentation/po out=www messages + +.PHONY: doc-po diff --git a/make/doclang-vars.make b/make/doclang-vars.make index 0d4da0e81b..9e34dac5ec 100644 --- a/make/doclang-vars.make +++ b/make/doclang-vars.make @@ -20,10 +20,10 @@ TEXI2HTML = LANG= $(TEXI2HTML_PROGRAM) TEXI2PDF_FLAGS += --batch $(DOCUMENTATION_INCLUDES) -TELY_FILES = $(call src-wildcard,*.tely) -OUT_TEXI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.texi) -DEEP_HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%/index.html) -PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf) +TELY_FILES := $(call src-wildcard,*.tely) +MASTER_TEXI_FILES := $(TELY_FILES:%.tely=$(outdir)/%.texi) +DEEP_HTML_FILES := $(TELY_FILES:%.tely=$(outdir)/%/index.html) +PDF_FILES := $(TELY_FILES:%.tely=$(outdir)/%.pdf) ITELY_FILES := $(call src-wildcard,*.itely) ITEXI_FILES := $(call src-wildcard,*.itexi) diff --git a/make/ly-rules.make b/make/ly-rules.make index bc9e47b963..fe849db405 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -12,14 +12,11 @@ $(outdir)/%.latex: %.doc # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --srcdir builds $(outdir)/%.texi: %.tely $(outdir)/version.itexi - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< $(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< -# -# DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE. -# rm -f $< $(outdir)/%.html.omf: %.tely $(call GENERATE_OMF,html) diff --git a/make/lysdoc-rules.make b/make/lysdoc-rules.make index b465501883..be960222b7 100644 --- a/make/lysdoc-rules.make +++ b/make/lysdoc-rules.make @@ -1,4 +1,3 @@ - $(outdir)/collated-files.tely: $(LY_FILES) $(OUT_LY_FILES) $(PYTHON) $(buildscript-dir)/lys-to-tely.py --name=$(outdir)/collated-files.tely --title="$(TITLE)" $^ diff --git a/make/lysdoc-targets.make b/make/lysdoc-targets.make index c2d08b5fec..0b5d6ec2ed 100644 --- a/make/lysdoc-targets.make +++ b/make/lysdoc-targets.make @@ -1,8 +1,6 @@ +local-WWW-1: $(outdir)/collated-files.texi $(outdir)/collated-files.pdf - -local-WWW: $(outdir)/collated-files.html $(outdir)/collated-files.pdf - -#.PRECIOUS: $(outdir)/$(NAME).texi +local-WWW-2: $(outdir)/collated-files.html local-test-baseline: rm -rf $(outdir)-baseline diff --git a/make/lysdoc-vars.make b/make/lysdoc-vars.make index e653213363..96d44b12f3 100644 --- a/make/lysdoc-vars.make +++ b/make/lysdoc-vars.make @@ -1,4 +1,2 @@ TITLE=LYs Doc -NAME=collated-files - diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make index 4a12833a55..deaf240861 100644 --- a/make/mutopia-targets.make +++ b/make/mutopia-targets.make @@ -1,14 +1,12 @@ .PHONY: download mutopia png ps scores tar .PRECIOUS: $(outdir)/%.ps $(outdir)/%-book.ps -.PRECIOUS: $(outdir)-letter/%.dvi $(outdir)-letter/%.ps +.PRECIOUS: $(outdir)-letter/%.ps all: $(OUT_FILES) -# we want dvi_examples as well, because they get thrown away otherwise -# incurring another costly lilypond run. -local-WWW: $(ly_examples) $(pdf_examples) $(png_examples) +local-WWW-1: $(ly_examples) $(pdf_examples) $(png_examples) tar: mkdir -p $(outdir)/$(tarball) @@ -24,7 +22,7 @@ scores: $(score_ps) $(MAKE) ps_examples="$<" ps local-mutopia: - $(MAKE) examples="$(mutopia-examples)" PAPERSIZE=letter local-WWW $(mutopia-letter) + $(MAKE) examples="$(mutopia-examples)" PAPERSIZE=letter local-WWW-1 $(mutopia-letter) mutopia: local-mutopia $(LOOP) diff --git a/stepmake/stepmake/documentation-targets.make b/stepmake/stepmake/documentation-targets.make index 8bcb8223fc..0f63330a21 100644 --- a/stepmake/stepmake/documentation-targets.make +++ b/stepmake/stepmake/documentation-targets.make @@ -1,5 +1 @@ -# do we need this? default: - -local-WWW: $(OUTHTML_FILES) - diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index 28c4a46ca3..ced5b7e3f7 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -1,5 +1,6 @@ -.PHONY : all clean config default dist doc exe help html lib TAGS\ - po +.PHONY : all clean config default dist dist exe help html lib TAGS\ + po web web-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2\ + web-install all: default $(LOOP) @@ -158,21 +159,30 @@ $(config_make): $(top-src-dir)/configure touch $@ # do something for multiple simultaneous configs. -################ website. +#### Documentation (website and tarball) -local-WWW: -local-WWW-post: +# documentation is built in two stages, +# plus WWW-post (only at toplevel) +# see INSTALL for more information. + +local-WWW-1: +local-WWW-2: web-install: +WWW-post: -WWW: local-WWW +WWW-1: local-WWW-1 $(LOOP) -WWW-post: local-WWW-post +WWW-2: local-WWW-2 $(LOOP) web: - $(MAKE) out=www WWW + $(MAKE) out=www WWW-1 + $(MAKE) out=www WWW-2 $(MAKE) out=www WWW-post +web-1: + $(MAKE) out=www WWW-1 + web-clean: $(MAKE) out=www clean diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make index aeda6e6171..8b6669af21 100644 --- a/stepmake/stepmake/texinfo-targets.make +++ b/stepmake/stepmake/texinfo-targets.make @@ -2,7 +2,7 @@ default: $(INFO_FILES) -local-WWW: $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.html)) +local-WWW-2: $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.html)) local-doc: $(OUTTXT_FILES) diff --git a/stepmake/stepmake/topdocs-targets.make b/stepmake/stepmake/topdocs-targets.make index 5c4777ec92..93d2f9cccf 100644 --- a/stepmake/stepmake/topdocs-targets.make +++ b/stepmake/stepmake/topdocs-targets.make @@ -1,6 +1,8 @@ default: local-doc -local-WWW: $(HTML_FILES) $(PDF_FILES) +local-WWW-1: $(PDF_FILES) + +local-WWW-2: $(HTML_FILES) make-txt-files: $(TO_TOP_FILES) -- 2.39.2