]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/GNUmakefile
Clean fonts and docs makefiles, trying to fix 'make -j' race conditions
[lilypond.git] / Documentation / GNUmakefile
index 9df5573532c44c28e678cf4e7f7b6b9086940b94..afff8d7dc4f65c7e40861f63d534e37b8496d1f7 100644 (file)
@@ -12,7 +12,7 @@ LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
 MANUALS_SUBDIRS = usage contributor essay \
   web learning notation extending
 SUBDIRS = $(MANUALS_SUBDIRS) snippets logo pictures misc po css topdocs \
-  included $(LANGS)
+  included ly-examples $(LANGS)
 STEPMAKE_TEMPLATES = documentation texinfo tex omf
 LOCALSTEPMAKE_TEMPLATES = lilypond ly
 
@@ -23,7 +23,7 @@ TEXI2PDF_FLAGS = \
   -I $(outdir) \
   -I $(top-build-dir)/Documentation/$(outconfbase)
 $(outdir)/snippets-big-page.html: TEXI2HTML_FLAGS += -D short_toc
-$(outdir)/snippets/index..html: TEXI2HTML_FLAGS += -D short_toc
+$(outdir)/snippets/index.html: TEXI2HTML_FLAGS += -D short_toc
 
 ### Extra source files
 
@@ -31,6 +31,7 @@ README_TOP_FILES= DEDICATION THANKS
 
 IN_ITELY_FILES = $(call src-wildcard,snippets/*-intro.itely)
 SNIPPET_LY_FILES = $(call src-wildcard,snippets/*.ly)
+OUT_SNIPPET_LY_FILES = $(SNIPPET_LY_FILES:%.ly=out/%.ly)
 
 EXTRA_DIST_FILES = $(call src-wildcard,*.init) $(call src-wildcard,*.bst)
 
@@ -134,18 +135,6 @@ $(outdir)/essay.texi: \
   $(outdir)/computer-notation.itexi \
   $(outdir)/engravingbib.itexi
 
-$(outdir)/others-did.itexi:
-       BSTINPUTS=$(src-dir)/web/ $(buildscript-dir)/bib2texi \
-               -s $(top-src-dir)/Documentation/lily-bib \
-               -o $(outdir)/others-did.itexi \
-               $(src-dir)/web/others-did.bib
-
-$(outdir)/we-wrote.itexi:
-       BSTINPUTS=$(src-dir)/web/ $(buildscript-dir)/bib2texi \
-               -s $(top-src-dir)/Documentation/lily-bib \
-               -o $(outdir)/we-wrote.itexi \
-               $(src-dir)/web/we-wrote.bib
-
 
 ###########
 ### Targets
@@ -206,13 +195,16 @@ endif
 #########
 ### Rules
 
-$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi
-       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+$(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)
 
-# cd $(outdir) rule gets bit hairy for --srcdir configure builds
-txt-to-html:
-       $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
-       $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
+$(OUT_TXT_FILES): $(outdir)/%.txt: $(top-src-dir)/%
+       cp -f $< $@
+
+$(OUT_TXT_FILES:%.txt=%.html): $(outdir)/%.html: $(outdir)/%.txt
+       $(PYTHON) $(step-bindir)/text2html.py $<
 
 # Explicitly list the dependencies on generated content
 $(outdir)/web.texi: $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi $(outdir)/weblinks.itexi
@@ -232,19 +224,19 @@ $(outdir)/css:
        ln -sf ../css/$(outdir) $@
 
 $(outdir)/ly-examples:
-       $(MAKE) -C web/ly-examples
-       ln -sf ../web/ly-examples/$(outdir) $@
+       $(MAKE) -C ly-examples
+       ln -sf ../ly-examples/$(outdir) $@
 endif
 
 
 # Ugh, using '%' twice not possible
 $(outdir)/notation/notation.xml: $(outdir)/notation.texi
        mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$(dir $@) --docbook $<
+       $(buildscript-dir)/run-and-check "$(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$(dir $@) --docbook $<"  "$*.makeinfoxml.log"
 
 $(outdir)/internals/internals.xml: $(outdir)/internals.texi
        mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$(dir $@) --docbook $<
+       $(buildscript-dir)/run-and-check "$(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$(dir $@) --docbook $<"  "$*.makeinfoxml.log"
 
 $(outdir)/learning.texi $(outdir)/notation.texi: $(OUT_PDF_IMAGES)
 
@@ -262,7 +254,15 @@ $(outdir)/%/source:
 $(outdir)/%.itely: snippets/%-intro.itely snippets/%.snippet-list
        xargs $(LYS_TO_TELY) -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
 
-$(outdir)/snippets.texi: $(GENERATED_ITELY_FILES) $(SNIPPET_LY_FILES)
+$(outdir)/snippets.texi: $(GENERATED_ITELY_FILES) $(OUT_SNIPPET_LY_FILES)
+
+$(OUT_SNIPPET_LY_FILES): out/ly-snippets.dep
+
+out/ly-snippets.dep: $(SNIPPET_LY_FILES)
+       mkdir -p snippets/out
+       $(buildscript-dir)/makesnippets $(src-dir)/snippets snippets/out $(src-dir)
+       mkdir -p out
+       touch $@
 
 $(outdir)/%.bib: %.bib
        ln -f $< $@
@@ -289,8 +289,7 @@ $(outdir)/ly-grammar.txt: $(top-src-dir)/lily/parser.yy
 # compilation during install, which is a bad thing (tm).
 
 $(outdir)/internals.texi: $(LILYPOND_BINARY)
-       cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
-
+       cd $(outdir) && $(buildscript-dir)/run-and-check "$(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation" "generate-documentation.log"
 
 ###############################################
 #  Documentation and translations maintenance #
@@ -380,5 +379,3 @@ update-translation:
 # what's it gonna be, boy...tranlationS-/translation-
 translation-status:
        PYTHONPATH=$(top-src-dir)/python:$(top-src-dir)/python/auxiliar $(PYTHON) $(top-src-dir)/scripts/auxiliar/translations-status.py
-
-.SECONDARY: