Better pdflatex compatibility in lilypond-book.
[lilypond.git] / GNUmakefile.in
blobca3cf2422a82640a271bd11db9598e0a785c5b13
1 # -*-Makefile-*-
2 # title specific top level makefile for LilyPond
4 # subdir level:
6 depth = .
9 # descent order into subdirectories
11 SUBDIRS = buildscripts scripts flower lily \
12 mf ly tex ps scm \
13 python po make \
14 cygwin debian $(builddir)/stepmake \
15 Documentation input
18 SCRIPTS = configure aclocal.m4 autogen.sh
19 README_FILES = ChangeLog CHANGES COPYING DEDICATION NEWS README.mandrake ROADMAP
20 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
21 IN_FILES := $(wildcard *.in)
22 EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore lexer-gcc-3.1.sh
23 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
24 INSTALLATION_DIR=$(local_lilypond_datadir)
25 INSTALLATION_FILES=$(configuration) VERSION
27 # bootstrap stepmake:
29 STEPMAKE_TEMPLATES=toplevel po install
30 include $(depth)/make/stepmake.make
33 footify:
34 $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
35 $(footify-all-command)
37 fonts:
38 $(MAKE) -C $(depth)/mf
40 run-reqs: builddir-setup fonts lily
41 web-reqs: run-reqs pfa-fonts
43 doc: run-reqs
44 $(MAKE) -C Documentation
46 web-doc: web-reqs
47 $(MAKE) out=www -C Documentation WWW
48 $(MAKE) footify
50 pfa-fonts:
51 $(MAKE) MAKE_PFA_FILES=1 -C mf
53 docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
54 install-html-doc: html-doc
55 $(INSTALL) -d $(docdir)/html
56 tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
58 # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
59 my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp
62 local-install:
63 $(INSTALL) -d $(local_lilypond_datadir)
64 ifeq ($(KPATHSEA),0)
65 $(foreach i, 1 2 3 4 5, rm -f $(local_lilypond_datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(local_lilypond_datadir)/tfm.$(i) ; )
66 endif
69 final-install:
70 @echo
71 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
72 @echo " *** must be run. You're advised to source these scripts from your "
73 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
74 @echo
76 TOP_HTMLS = index.html examples.html
78 examples: web-reqs
79 $(MAKE) out=www -C input WWW
80 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
82 lily: lily/$(outdir)/lilypond
84 lily/$(outdir)/lilypond:
85 $(MAKE) -C lily
87 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
89 web-ext = gz html midi pdf png txt
90 top-web:
91 cd $(builddir) && rm -f `find . -name \*.html~ -print`
92 cd $(builddir) && find Documentation input \
93 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
94 > $(outdir)/weblist
95 cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
96 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
98 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
99 ALL-TAGS:
100 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
102 local-WWW:
104 web: local-web
105 html-doc: web
106 index: web
108 local-WWW-clean: top-WWW-clean
110 WWW-clean:
111 $(MAKE) -C Documentation WWW-clean
112 $(MAKE) -C input WWW-clean
114 top-WWW-clean:
115 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
116 $(SHELL) $(buildscript-dir)/clean-fonts.sh
118 WWW:
120 default: $(config_h) builddir-setup
122 builddir-setup: $(builddir)/share/lilypond-force
124 $(builddir)/share/lilypond-force:
125 # Preparing LilyPond tree for builddir exec
126 @echo Making $(builddir)/share
127 @cd $(builddir) && rm -rf share
128 @mkdir -p $(builddir)/share/lilypond
129 @mkdir -p $(builddir)/share/lilypond/fonts
130 @mkdir -p $(builddir)/share/lilypond/tex
131 @cd $(builddir)/share/lilypond && \
132 ln -s $(abs-srcdir)/ly ly && \
133 ln -s ../../mf/$(outconfbase) dvips && \
134 ln -s ../../mf/$(outconfbase) afm && \
135 ln -s ../../mf/$(outconfbase) tfm && \
136 ln -s $(abs-srcdir)/mf && \
137 ln -s $(abs-srcdir)/ps && \
138 ln -s ../../python/$(outconfbase) python && \
139 ln -s $(abs-srcdir)/scm
140 @cd $(builddir)/share/lilypond/tex && \
141 ln -s $(abs-srcdir)/tex source && \
142 ln -s ../../../mf/$(outconfbase) generate
143 @cd $(builddir)/share/lilypond/fonts && \
144 ln -s $(abs-srcdir)/mf source && \
145 ln -s ../../../mf/$(outconfbase) afm && \
146 ln -s ../../../mf/$(outconfbase) tfm && \
147 ln -s ../../../mf/$(outconfbase) type1
149 local-clean: builddir-setup-clean
150 builddir-setup-clean:
151 @cd $(builddir) && rm -rf share
153 $(config_h): configure.in aclocal.m4
155 # this is to prevent people from getting
156 # undefined symbols when we add them to config.h.in,
157 # and they blindly run "cvs update; make".
159 @echo
160 @echo ' *** config.h is out of date'
161 @echo ' *** Remove it and rerun autogen:'
162 @echo ' rm config.h; ./autogen.sh'
163 @echo
164 @false