]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/GNUmakefile
Merge ssh+git://hanwen@repo.or.cz/srv/git/lilypond into master-hanwen
[lilypond.git] / Documentation / user / GNUmakefile
index 31094c6bb7ab0c806326dc52631712755753d270..03f132c43c7cf881871f73f6a0c08c8540b4cced 100644 (file)
@@ -2,29 +2,30 @@ depth=../..
 
 LATEX_FILES =$(call src-wildcard,*.latex)
 
-# todo: add latex.
-DVI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.dvi)
 
-EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES)
+EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt convert-ly.txt $(EPS_ILLUSTRATIONS)
+
 IMAGES=$(call src-wildcard,*.png)
+EPS_ILLUSTRATIONS=context-example.eps
+PDF_ILLUSTRATIONS=context-example.pdf
+
+OUT_PDF_IMAGES=$(IMAGES:%.png=$(outdir)/%.pdf) $(addprefix $(outdir)/,$(PDF_ILLUSTRATIONS))
+
+OUT_PNG_IMAGES=$(OUT_PDF_IMAGES:%.pdf=%.png)
 
-OUT_EPS_IMAGES=$(IMAGES:%.png=$(outdir)/%.eps)
-OUT_PNG_IMAGES=$(IMAGES:%=$(outdir)/%)
 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
  $(ITELY_FILES:%.itely=$(outdir)/%.texi)
 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%.html)\
  $(outdir)/lilypond-internals.html
 
-PS_FILES = $(DVI_FILES:.dvi=.ps)
-PDF_FILES = $(DVI_FILES:.dvi=.pdf)
-
-PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
+# todo: add latex.
+PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
 
 INFO_DOCS = lilypond lilypond-internals music-glossary
 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
 
 STEPMAKE_TEMPLATES=tex texinfo omf documentation
-
+#TEXI2DVI_FLAGS = -E
 OMF_FILES += $(outdir)/lilypond-internals.html.omf
 
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
@@ -35,10 +36,6 @@ export TEXINPUTS
 
 include $(depth)/make/stepmake.make
 
-dvi: $(DVI_FILES)
-
-ps: $(PS_FILES)
-
 info: $(INFO_FILES)
 
 pathsettings:
@@ -148,7 +145,7 @@ $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
 #
 # The split user manual
 #
-$(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
+$(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
        mkdir -p $(dir $@)
        $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
        find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
@@ -158,7 +155,7 @@ $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
 #
 # One big page manual
 #
-$(outdir)/lilypond.html: $(outdir)/lilypond.texi
+$(outdir)/lilypond.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
        $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
 
 #
@@ -192,14 +189,21 @@ $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internal
        mkdir -p $(dir $@)
        $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
 
-$(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
+$(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
 
 $(outdir)/%.png: %.png
        convert -geometry 50x50% $< $@
 
-$(outdir)/%.eps: %.png
+$(outdir)/%.png: %.eps
+       gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
+
+$(outdir)/%.pdf: %.png
        convert $< $@
 
+$(outdir)/%.pdf: %.eps
+       gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
+
+
 DEEP_HTML_FILES =\
  $(outdir)/lilypond/index.html\
  $(outdir)/lilypond-internals/index.html\
@@ -214,10 +218,12 @@ $(outdir)/source:
 
 $(outdir)/lilypond/source:
        @rm -f $(@)
+       mkdir -p $(outdir)/lilypond
        ln -sf ../../../ $(@)
 
 $(outdir)/music-glossary/source:
        @rm -f $(@)
+       mkdir -p $(outdir)/music-glossary
        ln -sf ../../../ $(@)
 
 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
@@ -250,9 +256,6 @@ $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
 $(outdir)/music-glossary.nexi:
 
 # Rules for the automatically generated documentation
-# When cross-compiling, we don't have lilypond, so we fake
-ifneq ($(CROSS),yes)
-
 
 # There used to be a dependency on a dummy target, to force a rebuild
 # of lilypond-internals every time.  however, this triggers
@@ -268,15 +271,6 @@ $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_
 $(outdir)/interfaces.itexi: dummy
        cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
 
-else
-
-$(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
-       touch $@
-       touch $(outdir)/$(*F).nexi
-
-$(outdir)/programming-interface.texi:
-       cp dummy-interfaces.itexi $@
-endif
 
 local-clean: local-delete