From: John Mandereau - LilyPond development Date: Thu, 28 Jun 2012 16:32:18 +0000 (+0200) Subject: Clean fonts and docs makefiles, trying to fix 'make -j' race conditions X-Git-Tag: release/2.15.41-1~7 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=e6a5019c531bbc6663e0eebc645409148dbd8931 Clean fonts and docs makefiles, trying to fix 'make -j' race conditions On my machine (GNU/Linux Fedora 17 x86_64 on an Intel Core 2 Duo), "make -j3 all" repeatedly calls fontforge before needed .pfb files are generated and makeinfo/extract_texi_filenames/texi2omf before .texi file has been generated/copied. Fix this by using order prerequisites and adding targets to WWW-1 (first stage of doc build); order (rather than ordinary) prerequisites avoid having always outdated targets, which would trigger compilation at install. Remove a rule for Info manual that is no longer needed and which might short-circuit .dep file generation. mf/GNUmakefile: also factorize prerequisites in fonts using a macro. --- diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index eb9a99a252..afff8d7dc4 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -195,7 +195,7 @@ endif ######### ### Rules -$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi +$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi | $(OUT_TEXINFO_MANUALS) $(buildscript-dir)/run-and-check "$(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<" "$*.makeinfo.log" txt-to-html: $(OUT_TXT_FILES) $(OUT_TXT_FILES:%.txt=%.html) diff --git a/make/doc-i18n-root-rules.make b/make/doc-i18n-root-rules.make index 289b73bf06..d374e5ca73 100644 --- a/make/doc-i18n-root-rules.make +++ b/make/doc-i18n-root-rules.make @@ -40,7 +40,7 @@ $(TRANSLATION_LILY_IMAGES): $(MASTER_TEXI_FILES) find $(outdir) \( -name '*.??.idx' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/$(outdir) touch $@ -$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi +$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi | $(OUT_TEXINFO_MANUALS) $(buildscript-dir)/run-and-check "$(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<" "$*.makeinfo.log" $(outdir)/index.$(ISOLANG).html: TEXI2HTML_INIT = $(WEB_TEXI2HTML_INIT) diff --git a/make/doc-i18n-root-targets.make b/make/doc-i18n-root-targets.make index a022da9ae5..cd5001174a 100644 --- a/make/doc-i18n-root-targets.make +++ b/make/doc-i18n-root-targets.make @@ -2,10 +2,10 @@ default: ifeq ($(out),www) ifneq ($(NO_PDF_FILES),) -local-WWW-1: $(MASTER_TEXI_FILES) $(XREF_MAPS_FILES) +local-WWW-1: $(OUT_TEXINFO_MANUALS) $(MASTER_TEXI_FILES) $(XREF_MAPS_FILES) endif ifeq ($(NO_PDF_FILES),) -local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) $(XREF_MAPS_FILES) +local-WWW-1: $(OUT_TEXINFO_MANUALS) $(MASTER_TEXI_FILES) $(PDF_FILES) $(XREF_MAPS_FILES) endif local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) $(DOCUMENTATION_LOCALE_TARGET) diff --git a/make/doc-i18n-root-vars.make b/make/doc-i18n-root-vars.make index 2d7ab99ad0..2b2242427b 100644 --- a/make/doc-i18n-root-vars.make +++ b/make/doc-i18n-root-vars.make @@ -9,6 +9,7 @@ MASTER_TEXI_FILES := $(TEXI_FILES) $(TELY_FILES:%.tely=$(outdir)/%.texi) TEXINFO_MANUALS =\ $(TELY_FILES:%.tely=%)\ $(TEXI_FILES:%.texi=%) +OUT_TEXINFO_MANUALS = $(TEXINFO_MANUALS:%=$(outdir)/%.texi) TOPDIR_HTML_MANUALS = SPLIT_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\ diff --git a/make/ly-rules.make b/make/ly-rules.make index fbe81c281a..954626f6bc 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -36,10 +36,10 @@ $(outdir)/%.html.omf: %.tely $(outdir)/%.pdf.omf: %.tely $(call GENERATE_OMF,pdf) -$(outdir)/%.html.omf: $(outdir)/%.texi +$(outdir)/%.html.omf: $(outdir)/%.texi | $(OUT_TEXINFO_MANUALS) $(call GENERATE_OMF,html) -$(outdir)/%.pdf.omf: $(outdir)/%.texi +$(outdir)/%.pdf.omf: $(outdir)/%.texi | $(OUT_TEXINFO_MANUALS) $(call GENERATE_OMF,pdf) $(outdir)/others-did.itexi $(outdir)/we-wrote.itexi: $(outdir)/%.itexi: $(top-src-dir)/Documentation/web/%.bib $(top-src-dir)/Documentation/lily-bib.bst diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 532a25ec7b..f81b56dabe 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -7,11 +7,6 @@ STEPMAKE_TEMPLATES = metafont \ install-out LOCALSTEPMAKE_TEMPLATES = lilypond -include $(depth)/make/stepmake.make - - -EXTRA_DIST_FILES += README mf2pt1.mp - # We don't use $(MF_FILES), because there's more .mf cruft here FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \ $(call src-wildcard,feta-braces-[a-z].mf) \ @@ -20,6 +15,14 @@ FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \ $(call src-wildcard,feta-flags*[0-9].mf) \ $(call src-wildcard,parmesan[0-9]*.mf) \ $(call src-wildcard,parmesan-noteheads*[0-9].mf) +FETA_FONTS = $(FETA_MF_FILES:.mf=) +ALL_FONTS = $(FETA_FONTS) +PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb) + +include $(depth)/make/stepmake.make + + +EXTRA_DIST_FILES += README mf2pt1.mp STAFF_SIZES = 11 13 14 16 18 20 23 26 BRACES = a b c d e f g h i @@ -29,7 +32,6 @@ OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \ PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe) OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \ $(BRACES:%=$(outdir)/feta-braces-%.otf-table) -FETA_FONTS = $(FETA_MF_FILES:.mf=) SVG_FILES = $(OTF_FILES:%.otf=%.svg) WOFF_FILES = $(OTF_FILES:%.otf=%.woff) @@ -55,34 +57,20 @@ $(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gt echo '(design_size . 20)' > $@ -# only for fonts which -# -# 1. are mentioned in font.scm -# -# 2. are not included with teTeX -# -$(outdir)/emmentaler-%.otf\ - $(outdir)/emmentaler-%.svg\ - $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.pe \ - $(outdir)/feta%.pfb \ - $(outdir)/feta-noteheads%.pfb \ - $(outdir)/feta-flags%.pfb \ - $(outdir)/feta-alphabet%.pfb \ - $(outdir)/parmesan%.pfb \ - $(outdir)/parmesan-noteheads%.pfb \ - $(outdir)/feta%.otf-table \ - $(outdir)/feta%.otf-gtable - cd $(outdir) && $(FONTFORGE) -script $(notdir $(basename ,$@).pe) +## ugh -- we want this to prevent failing -j2 compiles. +define FETAxx-PREREQUISITES -$(outdir)/emmentaler-brace.otf\ - $(outdir)/emmentaler-brace.svg\ - $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.pe \ - $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \ - $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable - cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe -$(outdir)/%.pfb: $(outdir)/%.log +$(outdir)/feta$(i).otf-table: $(outdir)/feta$(i).lisp \ + $(outdir)/feta-noteheads$(i).lisp \ + $(outdir)/feta-flags$(i).lisp \ + $(outdir)/parmesan$(i).lisp \ + $(outdir)/parmesan-noteheads$(i).lisp \ + $(outdir)/feta-alphabet$(i).lisp +endef + +$(eval $(foreach i,$(STAFF_SIZES),$(FETAxx-PREREQUISITES))) $(outdir)/%.otf-table: $(outdir)/%.lisp cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \ @@ -92,56 +80,6 @@ $(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@ -## ugh -- we want this to prevent failing -j2 compiles. -$(outdir)/feta26.otf-table: $(outdir)/feta26.lisp \ - $(outdir)/feta-noteheads26.lisp \ - $(outdir)/feta-flags26.lisp \ - $(outdir)/parmesan26.lisp \ - $(outdir)/parmesan-noteheads26.lisp \ - $(outdir)/feta-alphabet26.lisp -$(outdir)/feta23.otf-table: $(outdir)/feta23.lisp \ - $(outdir)/feta-noteheads23.lisp \ - $(outdir)/feta-flags23.lisp \ - $(outdir)/parmesan23.lisp \ - $(outdir)/parmesan-noteheads23.lisp \ - $(outdir)/feta-alphabet23.lisp -$(outdir)/feta20.otf-table: $(outdir)/feta20.lisp \ - $(outdir)/feta-noteheads20.lisp \ - $(outdir)/feta-flags20.lisp \ - $(outdir)/parmesan20.lisp \ - $(outdir)/parmesan-noteheads20.lisp \ - $(outdir)/feta-alphabet20.lisp -$(outdir)/feta18.otf-table: $(outdir)/feta18.lisp \ - $(outdir)/feta-noteheads18.lisp \ - $(outdir)/feta-flags18.lisp \ - $(outdir)/parmesan18.lisp \ - $(outdir)/parmesan-noteheads18.lisp \ - $(outdir)/feta-alphabet18.lisp -$(outdir)/feta16.otf-table: $(outdir)/feta16.lisp \ - $(outdir)/feta-noteheads16.lisp \ - $(outdir)/feta-flags16.lisp \ - $(outdir)/parmesan16.lisp \ - $(outdir)/parmesan-noteheads16.lisp \ - $(outdir)/feta-alphabet16.lisp -$(outdir)/feta14.otf-table: $(outdir)/feta14.lisp \ - $(outdir)/feta-noteheads14.lisp \ - $(outdir)/feta-flags14.lisp \ - $(outdir)/parmesan14.lisp \ - $(outdir)/parmesan-noteheads14.lisp \ - $(outdir)/feta-alphabet14.lisp -$(outdir)/feta13.otf-table: $(outdir)/feta13.lisp \ - $(outdir)/feta-noteheads13.lisp \ - $(outdir)/feta-flags13.lisp \ - $(outdir)/parmesan13.lisp \ - $(outdir)/parmesan-noteheads13.lisp \ - $(outdir)/feta-alphabet13.lisp -$(outdir)/feta11.otf-table: $(outdir)/feta11.lisp \ - $(outdir)/feta-noteheads11.lisp \ - $(outdir)/feta-flags11.lisp \ - $(outdir)/parmesan11.lisp \ - $(outdir)/parmesan-noteheads11.lisp \ - $(outdir)/feta-alphabet11.lisp - $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \ $(outdir)/emmentaler-brace.fontname \ $(outdir)/emmentaler-brace.otf-table \ @@ -160,9 +98,6 @@ $(outdir)/emmentaler-brace.subfonts: $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts $< --dir=$(outdir) -ALL_FONTS = $(FETA_FONTS) -PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb) - # Make tfm files first, log files last, # so that normally log files aren't made twice @@ -180,7 +115,7 @@ ALL_GEN_FILES = $(LOG_FILES) \ INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source INSTALLATION_FILES = $(MF_FILES) -INSTALLATION_OUT_SUFFIXES = 1 2 3 +INSTALLATION_OUT_SUFFIXES = 1 2 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf INSTALLATION_OUT_FILES1 = $(OTF_FILES) \ @@ -191,8 +126,48 @@ INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES) export MFINPUTS := .:$(MFINPUTS) +# only for fonts which +# +# 1. are mentioned in font.scm +# +# 2. are not included with teTeX +# +$(outdir)/%.lisp \ +$(outdir)/%.otf-gtable \ +$(outdir)/%.enc \ +$(outdir)/%.pe: $(outdir)/%.log $(outdir)/%.tfm + $(buildscript-dir)/mf-to-table \ + --global-lisp=$(outdir)/$(