2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts scripts flower lily \
14 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
23 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
24 INSTALLATION_DIR=$(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 $(datadir)
65 $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
69 TOP_HTMLS = index.html short-examples.html long-examples.html
71 short-examples: web-reqs
72 $(MAKE) out=www -C input WWW
73 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
75 long-examples: web-reqs
76 $(MAKE) out=www -C mutopia WWW
77 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html mutopia/
79 lily: lily/$(outdir)/lilypond
81 lily/$(outdir)/lilypond:
84 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
86 web-ext = gz html midi pdf png txt
88 cd $(builddir) && rm -f `find . -name \*.html~ -print`
89 cd $(builddir) && find Documentation input mutopia \
90 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
92 cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
93 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
95 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
97 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
105 local-WWW-clean: top-WWW-clean
108 $(MAKE) -C Documentation WWW-clean
109 $(MAKE) -C input WWW-clean
110 $(MAKE) -C mutopia WWW-clean
113 cd $(depth)/$(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
114 $(SHELL) $(buildscript-dir)/clean-fonts.sh
118 default: builddir-setup
120 builddir-setup: $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force
122 $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
123 # Preparing LilyPond tree for builddir exec
124 @echo Making $(depth)/$(builddir)/share
125 @cd $(depth)/$(builddir) && rm -rf share
126 @cd $(depth)/$(builddir) && mkdir -p share/lilypond
127 @cd $(depth)/$(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
128 @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
129 ln -s ../../../$(srcdir)/ly ly && \
130 ln -s ../../../mf/$(outconfbase) dvips && \
131 ln -s ../../../mf/$(outconfbase) afm && \
132 ln -s ../../../mf/$(outconfbase) tfm && \
133 ln -s ../../../$(srcdir)/mf && \
134 ln -s ../../../$(srcdir)/ps && \
135 ln -s ../../../$(srcdir)/scm
136 @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
138 @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/tex && \
139 ln -s ../../../../$(srcdir)/tex source && \
140 ln -s ../../../../mf/$(outconfbase) generate
141 @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
143 @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \
144 ln -s ../../../../$(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 $(depth)/$(builddir) && rm -rf share