]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/ly-rules.make
Merge branch 'dev/texi2html' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / make / ly-rules.make
index e95bfafe62bcd18b2cba68cbbe080d927a2a3be0..caad2146d8b0dab7a699a6eeaa1c2b62cfd439dd 100644 (file)
@@ -1,36 +1,40 @@
-# Mudela_rules.make
+.SUFFIXES: .doc .tely .texi .ly
 
-.SUFFIXES: .doc .dvi .mudtex .tely .texi
+# TODO: fix hardcoded out/ ?
+LYS_OUTPUT_OPTION= --lily-output-dir $(top-build-dir)/out/lybook-db/
+LILYPOND_BOOK_FLAGS += $(LYS_OUTPUT_OPTION)
+$(outdir)/%.latex:  %.doc
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $<
 
-SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ;         mv $(outdir)/temp.dep $(basename $@).dep 
 
-$(outdir)/%.latex: %.doc
-       rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $<
-       chmod -w $@
-       $(SUBST_TEXI_DEPS)
 
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
-# it is not, for --scrdir builds
-$(outdir)/%.texi: %.tely
-       rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --format=texi $<
-       $(SUBST_TEXI_DEPS)
-       chmod -w $@
-
-# nexi: no-lily texi
-# for plain info doco: don't run lily
-$(outdir)/%.nexi: %.tely
-       rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
-       mv $(@D)/$(*F).texi $@
-       $(SUBST_TEXI_DEPS)
-       chmod -w $@
-
-# nfo: info from non-lily texi
-$(outdir)/%.info: $(outdir)/%.nexi
-       -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
-
-# nfo: info from non-lily texi
-#$(outdir)/%.nfo: $(outdir)/%.nexi
-#      -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
+# it is not, for --srcdir builds
+$(outdir)/%.texi: %.tely $(outdir)/version.itexi
+       $(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) $<
+
+
+$(outdir)/%.texi: $(outdir)/%.tely $(outdir)/version.itexi
+       $(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) $<
+#
+# DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
+#      rm -f $<
+
+
+$(outdir)/%.html.omf: %.tely
+       $(call GENERATE_OMF,html)
+
+$(outdir)/%.pdf.omf: %.tely
+       $(call GENERATE_OMF,pdf)
+
+$(outdir)/%.ps.gz.omf: %.tely
+       $(call GENERATE_OMF,ps.gz)
+
+$(outdir)/%.html.omf: $(outdir)/%.texi
+       $(call GENERATE_OMF,html)
+
+$(outdir)/%.pdf.omf: $(outdir)/%.texi
+       $(call GENERATE_OMF,pdf)
+
+$(outdir)/%.ps.gz.omf: $(outdir)/%.texi
+       $(call GENERATE_OMF,ps.gz)