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
include $(depth)/make/stepmake.make
-dvi: $(DVI_FILES)
-
-ps: $(PS_FILES)
-
info: $(INFO_FILES)
pathsettings:
#
# 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
#
# 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 $<
#
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\
$(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)\