]> git.donarmstrong.com Git - lilypond.git/blob - make/ly-rules.make
Merge branch 'lilypond/translation' into staging
[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) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $<
9
10
11 # This allows -j make option while making sure only one lilypond-book instance
12 # is running at the same time
13 define CHAIN_RULE
14 $(i)
15 $(i): 
16 endef
17
18 $(eval $(firstword $(TEXI_FILES_FROM_TELY)):\
19  $(foreach i, $(wordlist 2, $(words $(TEXI_FILES_FROM_TELY)),\
20  $(TEXI_FILES_FROM_TELY)),$(CHAIN_RULE)))
21
22 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
23 # it is not, for --srcdir builds
24 $(outdir)/%.texi: %.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
25         LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(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 $<
26
27
28 $(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES)
29         LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(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 $<
30
31
32 $(outdir)/%.html.omf: %.tely
33         $(call GENERATE_OMF,html)
34
35 $(outdir)/%.pdf.omf: %.tely
36         $(call GENERATE_OMF,pdf)
37
38 $(outdir)/%.html.omf: $(outdir)/%.texi
39         $(call GENERATE_OMF,html)
40
41 $(outdir)/%.pdf.omf: $(outdir)/%.texi
42         $(call GENERATE_OMF,pdf)
43
44 $(outdir)/others-did.itexi $(outdir)/we-wrote.itexi: $(outdir)/%.itexi: $(top-src-dir)/Documentation/web/%.bib $(top-src-dir)/Documentation/lily-bib.bst
45         BSTINPUTS=$(top-src-dir)/Documentation/web/ $(buildscript-dir)/bib2texi \
46                 -s $(top-src-dir)/Documentation/lily-bib \
47                 -o $(outdir)/$*.itexi \
48                 $(top-src-dir)/Documentation/web/$*.bib