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=$(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 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/$(TOPLEVEL_VERSION)-force
117 $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
118 # Preparing LilyPond tree for builddir exec
119 @echo Making $(builddir)/share
120 @cd $(builddir) && rm -rf share
121 @cd $(builddir) && mkdir -p share/lilypond
122 @cd $(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
123 @cd $(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
124 ln -s ../../../$(srcdir)/ly ly && \
125 ln -s ../../../mf/$(outconfbase) dvips && \
126 ln -s ../../../mf/$(outconfbase) afm && \
127 ln -s ../../../mf/$(outconfbase) tfm && \
128 ln -s ../../../$(srcdir)/mf && \
129 ln -s ../../../$(srcdir)/ps && \
130 ln -s ../../../$(srcdir)/scm
131 @cd $(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
133 @cd $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/tex && \
134 ln -s ../../../../$(srcdir)/tex source && \
135 ln -s ../../../../mf/$(outconfbase) generate
136 @cd $(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
138 @cd $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \
139 ln -s ../../../../$(srcdir)/mf source && \
140 ln -s ../../../../mf/$(outconfbase) afm && \
141 ln -s ../../../../mf/$(outconfbase) tfm && \
142 ln -s ../../../../mf/$(outconfbase) type1
144 local-clean: builddir-setup-clean
145 builddir-setup-clean:
146 @cd $(builddir) && rm -rf share