]> git.donarmstrong.com Git - lilypond.git/blob - make/ly-rules.make
($(outdir)/%.texi): use variable for outdir.
[lilypond.git] / make / ly-rules.make
1 .SUFFIXES: .doc .dvi .tely .texi .ly
2
3
4 $(outdir)/%.latex: %.doc
5         if [ -f $@ ]; then chmod a+w $@; fi
6         $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --verbose $(LILYPOND_BOOK_FLAGS) $<
7         chmod -w $@
8
9 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
10 # it is not, for --srcdir builds
11 $(outdir)/%.texi: %.tely
12         if [ -f $@ ]; then chmod a+w $@; fi
13         rm -f $$(grep -LF '\lilypondend' $(outdir)/lily-*.tex 2>/dev/null)
14         $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
15         chmod -w $@
16
17 $(outdir)/%.texi: $(outdir)/%.tely
18         if [ -f $@ ]; then chmod a+w $@; fi
19         rm -f $$(grep -LF '\lilypondend' $(outdir)/lily-*.tex 2>/dev/null)
20         $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
21 #
22 # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
23 #       rm -f $<
24         chmod -w $@
25
26 # nexi: n[o-lilypond t]exi
27 # for plain info doco: don't run lilypond
28 $(outdir)/%.nexi: %.tely
29         if [ -f $@ ]; then chmod a+w $@; fi
30         rm -f $(outdir)/$*.texi
31         $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) --process='true' $<
32         mv $(outdir)/$*.texinfo $@ 2>/dev/null || mv $(outdir)/$*.texi $@
33 # makeinfo <= 4.6 image bug workaround
34         if [ $(MAKEINFO_VERSION) -le 4006000 ]; then \
35                 (cd $(outdir) && \
36                 ls -1 lily-*.ly | sed 's/.ly$$/.txt/' | xargs touch) || true; \
37         fi
38         chmod -w $@
39
40 $(outdir)/%.info: $(outdir)/%.nexi
41         $(MAKEINFO) -I $(outdir) --output=$(outdir)/$(*F).info $<
42
43 # Timothy's booklet
44 #
45 $(outdir)/%-book.ps: $(outdir)/%.ps
46         psbook $< $<.tmp
47         pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
48
49 $(outdir)/%.pdf: $(outdir)/%.dvi
50         dvips $(DVIPS_FLAGS)  -o $@.pdfps -t $(DVIPS_PAPERSIZE)  $<
51         ps2pdf -sPAPERSIZE=$(DVIPS_PAPERSIZE) $@.pdfps $@
52
53 $(outdir)/%.html.omf: %.tely
54         $(call GENERATE_OMF,html)
55
56 $(outdir)/%.pdf.omf: %.tely
57         $(call GENERATE_OMF,pdf)
58
59 $(outdir)/%.ps.gz.omf: %.tely
60         $(call GENERATE_OMF,ps.gz) 
61
62 $(outdir)/%.html.omf: $(outdir)/%.texi
63         $(call GENERATE_OMF,html)
64
65 $(outdir)/%.pdf.omf: $(outdir)/%.texi
66         $(call GENERATE_OMF,pdf)
67
68 $(outdir)/%.ps.gz.omf: $(outdir)/%.texi
69         $(call GENERATE_OMF,ps.gz)