]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/ly-rules.make
Fifth section done.
[lilypond.git] / make / ly-rules.make
index 174dee86eb85889b90b596c6e8544ccc9d5b8500..0e899a77719fc1e72edad6e38e1724590684e6e2 100644 (file)
@@ -10,40 +10,36 @@ $(outdir)/%.latex: %.doc
 # it is not, for --srcdir builds
 $(outdir)/%.texi: %.tely
        if [ -f $@ ]; then chmod a+w $@; fi
+       rm -f $$(grep -LF '\lilypondend' $(outdir)/lily-*.tex 2>/dev/null)
        $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
        chmod -w $@
 
 $(outdir)/%.texi: $(outdir)/%.tely
        if [ -f $@ ]; then chmod a+w $@; fi
+       rm -f $$(grep -LF '\lilypondend' $(outdir)/lily-*.tex 2>/dev/null)
        $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
 #
 # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
 #      rm -f $<
        chmod -w $@
 
-# nexi: no-lily texi
-# for plain info doco: don't run lily
+# nexi: n[o-lilypond t]exi
+# for plain info doco: don't run lilypond
 $(outdir)/%.nexi: %.tely
        if [ -f $@ ]; then chmod a+w $@; fi
+       rm -f $(outdir)/$*.texi
        $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) --process='true' $<
        mv $(outdir)/$*.texinfo $@ 2>/dev/null || mv $(outdir)/$*.texi $@
+# makeinfo <= 4.6 image bug workaround
+       if [ $(MAKEINFO_VERSION) -le 4006000 ]; then \
+               (cd $(outdir) && \
+               ls -1 lily-*.ly | sed 's/.ly$$/.txt/' | xargs touch) || true; \
+       fi
        chmod -w $@
 
-# nfo: info from non-lily texi
 $(outdir)/%.info: $(outdir)/%.nexi
        $(MAKEINFO) -I $(outdir) --output=$(outdir)/$(*F).info $<
 
-# nfo: info from non-lily texi
-#$(outdir)/%.nfo: $(outdir)/%.nexi
-#      $(MAKEINFO) --output=$(outdir)/$(*F).info $<
-
-#
-# let's not do this: this interferes with the lilypond-book dependency mechanism.
-#
-##$(outdir)/%.tex: $(outdir)/%.ly
-##     $(LILYPOND) $(LILYPOND_BOOK_INCLUDES) -o $@ $< 
-
-#
 # Timothy's booklet
 #
 $(outdir)/%-book.ps: $(outdir)/%.ps
@@ -51,10 +47,9 @@ $(outdir)/%-book.ps: $(outdir)/%.ps
        pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
 
 $(outdir)/%.pdf: $(outdir)/%.dvi
-       dvips -u +lilypond.map -o $@.pdfps -t $(DVIPS_PAPERSIZE)  -Ppdf $<
+       dvips $(DVIPS_FLAGS)  -o $@.pdfps -t $(DVIPS_PAPERSIZE)  $<
        ps2pdf -sPAPERSIZE=$(DVIPS_PAPERSIZE) $@.pdfps $@
 
-
 $(outdir)/%.html.omf: %.tely
        $(call GENERATE_OMF,html)
 
@@ -64,7 +59,6 @@ $(outdir)/%.pdf.omf: %.tely
 $(outdir)/%.ps.gz.omf: %.tely
        $(call GENERATE_OMF,ps.gz) 
 
-
 $(outdir)/%.html.omf: $(outdir)/%.texi
        $(call GENERATE_OMF,html)