2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts scripts flower lily \
14 cygwin debian $(builddir)/stepmake \
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 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
29 STEPMAKE_TEMPLATES=toplevel po install
30 include $(depth)/make/stepmake.make
34 $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
35 $(footify-all-command)
38 $(MAKE) -C $(depth)/mf
40 run-reqs: builddir-setup fonts lily
41 web-reqs: run-reqs pfa-fonts
44 $(MAKE) -C Documentation
47 $(MAKE) out=www -C Documentation WWW
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
63 $(INSTALL) -d $(local_lilypond_datadir)
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) ; )
69 TOP_HTMLS = index.html examples.html
72 $(MAKE) out=www -C input WWW
73 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
75 lily: lily/$(outdir)/lilypond
77 lily/$(outdir)/lilypond:
80 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
82 web-ext = gz html midi pdf png txt
84 cd $(builddir) && rm -f `find . -name \*.html~ -print`
85 cd $(builddir) && find Documentation input \
86 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
88 cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
89 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
91 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
93 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
101 local-WWW-clean: top-WWW-clean
104 $(MAKE) -C Documentation WWW-clean
105 $(MAKE) -C input WWW-clean
108 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
109 $(SHELL) $(buildscript-dir)/clean-fonts.sh
113 default: builddir-setup
115 builddir-setup: $(builddir)/share/lilypond-force
117 $(builddir)/share/lilypond-force:
118 # Preparing LilyPond tree for builddir exec
119 @echo Making $(builddir)/share
120 @cd $(builddir) && rm -rf share
121 @mkdir -p $(builddir)/share/lilypond
122 @mkdir -p $(builddir)/share/lilypond/fonts
123 @mkdir -p $(builddir)/share/lilypond/tex
124 @cd $(builddir)/share/lilypond && \
125 ln -s $(abs-srcdir)/ly ly && \
126 ln -s ../../mf/$(outconfbase) dvips && \
127 ln -s ../../mf/$(outconfbase) afm && \
128 ln -s ../../mf/$(outconfbase) tfm && \
129 ln -s $(abs-srcdir)/mf && \
130 ln -s $(abs-srcdir)/ps && \
131 ln -s $(abs-srcdir)/scm
132 @cd $(builddir)/share/lilypond/tex && \
133 ln -s $(abs-srcdir)/tex source && \
134 ln -s ../../../mf/$(outconfbase) generate
135 @cd $(builddir)/share/lilypond/fonts && \
136 ln -s $(abs-srcdir)/mf source && \
137 ln -s ../../../mf/$(outconfbase) afm && \
138 ln -s ../../../mf/$(outconfbase) tfm && \
139 ln -s ../../../mf/$(outconfbase) type1
141 local-clean: builddir-setup-clean
142 builddir-setup-clean:
143 @cd $(builddir) && rm -rf share