* GNUmakefile.in (local-WWW-post): footify build fix.
[lilypond.git] / Documentation / user / GNUmakefile
blob72362dc6cdf41797e85d4d0681946985226bd5af
1 # Documentation/tex/Makefile
3 depth=../..
6 LATEX_FILES =$(wildcard *.latex)
8 # todo: add latex.
9 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
11 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES)
12 IMAGES=$(wildcard *.png)
14 OUT_EPS_IMAGES=$(addprefix $(outdir)/,$(IMAGES:.png=.eps))
15 OUT_PNG_IMAGES=$(addprefix $(outdir)/,$(IMAGES))
17 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
19 PS_FILES = $(DVI_FILES:.dvi=.ps)
20 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
22 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
24 INFO_DOCS = lilypond lilypond-internals music-glossary
25 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
27 STEPMAKE_TEMPLATES=tex texinfo omf documentation
29 OMF_FILES += $(outdir)/lilypond-internals.html.omf
31 LOCALSTEPMAKE_TEMPLATES=lilypond ly
32 LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
34 include $(depth)/make/stepmake.make
36 # Ugh,ugh.
37 # emacs cannot fix the menu structure when @mbinclude is used
38 # lilypond.tely uses mbinclude
39 TEXINFO_SOURCES := $(filter-out lilypond.tely, $(TEXINFO_SOURCES))
42 dvi: $(DVI_FILES)
44 ps: $(PS_FILES)
46 # Cancel the default info generation rule. We want to generate info
47 # from `.nexi', making sure we don't run LilyPond for inline pictures,
48 # when just generating info:
50 $(outdir)/%.info: $(outdir)/%.texi
52 default:
54 # Info is now built by default via texinfo-rules.
55 # We must build them by default, otherwise they get built during make install
56 info: $(INFO_FILES)
58 local-help: extra-local-help
60 extra-local-help:
61 @echo -e "\
62 dvi update dvi documents\n\
63 info update info pages\n\
64 ps update PostScript documents\n\
67 # Generic rule using % twice not possible?
68 # $(outdir)/%/%.html: $(outdir)/%.texi
69 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
70 mkdir -p $(dir $@)
71 $(MAKEINFO) --output=$(outdir)/lilypond --html $<
72 $(MAKEINFO) -I $(outdir) --output=$@ --html --no-split --no-headers $<
73 -cp -f $(outdir)/*.{png,ly} $(outdir)/lilypond
75 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
76 mkdir -p $(dir $@)
77 $(MAKEINFO) --output=$(outdir)/lilypond-internals --html $<
78 $(MAKEINFO) -I $(outdir) --output=$@ --html --no-split --no-headers $<
80 ifeq ($(SPLITTING_MAKEINFO),yes)
82 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
84 $(outdir)/%.png: %.png
85 convert -resize 50x50% $< $@
87 $(outdir)/%.eps: %.png
88 convert $< $@
90 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
92 else
94 # Links referred to by Documentation index
95 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
97 local-WWW: outimages deep-symlinks
99 deep-symlinks:
100 mkdir -p $(outdir)/lilypond
101 cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
102 rm -f $(i) && ln -s lilypond.html $(i) &&) true
104 endif
107 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
109 local-WWW-clean: deep-WWW-clean
111 deep-WWW-clean:
112 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
114 info-dir:
115 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
118 $(outdir)/%.bib: %.bib
119 ln -f $< $@
121 local-clean:
122 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
123 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
125 #$(outdir)/lilypond.nexi: $(outdir)/interfaces.itexi
126 #$(outdir)/lilypond.texi: $(outdir)/interfaces.itexi
128 # Rules for the automatically generated documentation
129 # When cross-compiling, we don't have lilypond, so we fake
130 ifneq ($(CROSS),yes)
133 # there used to be a dependency on a dummy target, to force a rebuild of lilypond-internals every time.
134 # however, this triggers compilation during install, which is a bad thing (tm).
136 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
137 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
138 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
141 ## unused
142 $(outdir)/interfaces.itexi: dummy
143 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
145 else
147 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
148 touch $@
149 touch $(outdir)/$(*F).nexi
151 $(outdir)/interfaces.itexi:
152 cp dummy-interfaces.itexi $@
153 endif