]> git.donarmstrong.com Git - lilypond.git/blob - make/ly-rules.make
Release: bump VERSION.
[lilypond.git] / make / ly-rules.make
1 .SUFFIXES: .doc .tely .texi .ly
2
3 # TODO: fix hardcoded out/ ?
4 LYS_OUTPUT_OPTION= --lily-output-dir $(LYS_OUTPUT_DIR)
5 LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-db
6 LILYPOND_BOOK_FLAGS += $(LYS_OUTPUT_OPTION)
7 $(outdir)/%.latex: %.doc $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
8         LILYPOND_VERSION=$(TOPLEVEL_VERSION) PDFTEX=$(PDFTEX) PDFLATEX=$(PDFLATEX) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $<
9
10
11 # This allows -j make option while making sure only one lilypond-book instance
12 # is running at the same time, using GNU make's order-only prerequisites so
13 # as to not create superficial dependencies between unrelated manuals.
14 define CHAIN_RULE
15 | $(i)
16 $(i): 
17 endef
18
19 $(eval $(firstword $(TEXI_FILES_FROM_TELY)):\
20  $(foreach i, $(wordlist 2, $(words $(TEXI_FILES_FROM_TELY)),\
21  $(TEXI_FILES_FROM_TELY)),$(CHAIN_RULE)))
22
23 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
24 # it is not, for --srcdir builds
25 $(outdir)/%.texi: %.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
26         LILYPOND_VERSION=$(TOPLEVEL_VERSION) PDFTEX=$(PDFTEX) PDFLATEX=$(PDFLATEX) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $<
27
28
29 $(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
30         LILYPOND_VERSION=$(TOPLEVEL_VERSION) PDFTEX=$(PDFTEX) PDFLATEX=$(PDFLATEX) $(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) --redirect-lilypond-output $<
31
32
33 $(outdir)/%.html.omf: %.tely
34         $(call GENERATE_OMF,html)
35
36 $(outdir)/%.pdf.omf: %.tely
37         $(call GENERATE_OMF,pdf)
38
39 $(outdir)/%.html.omf: $(outdir)/%.texi | $(OUT_TEXINFO_MANUALS)
40         $(call GENERATE_OMF,html)
41
42 $(outdir)/%.pdf.omf: $(outdir)/%.texi | $(OUT_TEXINFO_MANUALS)
43         $(call GENERATE_OMF,pdf)
44
45 $(outdir)/others-did.itexi $(outdir)/we-wrote.itexi: $(outdir)/%.itexi: $(top-src-dir)/Documentation/web/%.bib $(top-src-dir)/Documentation/lily-bib.bst
46         BSTINPUTS=$(top-src-dir)/Documentation/web/ $(buildscript-dir)/bib2texi \
47                 -s $(top-src-dir)/Documentation/lily-bib \
48                 -o $(outdir)/$*.itexi \
49                 -q \
50                 $(top-src-dir)/Documentation/web/$*.bib