2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
15 cygwin debian $(builddir)/stepmake \
19 SCRIPTS = configure aclocal.m4 autogen.sh
20 README_FILES = ChangeLog COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS
21 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt
22 IN_FILES := $(wildcard *.in)
23 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 lilypond.words
24 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
25 INSTALLATION_DIR=$(local_lilypond_datadir)
26 INSTALLATION_FILES=$(configuration) VERSION
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make
35 $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
36 $(footify-all-command)
39 $(MAKE) -C $(depth)/mf
41 run-reqs: builddir-setup fonts lily
42 web-reqs: run-reqs pfa-fonts
45 $(MAKE) -C Documentation
48 $(MAKE) MAKE_PFA_FILES=1 -C mf
49 (cd $(builddir)/share/lilypond/fonts && \
50 tar czvf ../../../$(outbase)/type1.tar.gz type1/*.pfa type1/fonts.* type1/lilypond.* )
52 install-html-doc: top-web
53 $(INSTALL) -m 755 -d $(local_package_docdir)
54 tar -C $(local_package_docdir)/ -xzf $(outdir)/web.tar.gz
57 $(INSTALL) -d $(local_lilypond_datadir)
61 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
62 @echo " *** must be run. You're advised to source these scripts from your "
63 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
66 TOP_HTMLS = index.html examples.html
69 $(MAKE) out=www -C input WWW
70 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
72 lily: lily/$(outdir)/lilypond
74 lily/$(outdir)/lilypond:
77 local-web: $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
80 web-ext = gz html midi pdf png txt ly
82 cd $(builddir) && rm -f `find . -name \*.html~ -print`
83 cd $(builddir) && find Documentation input \
84 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
86 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
87 cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
88 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
90 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
92 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
100 local-WWW-clean: top-WWW-clean
103 $(MAKE) -C Documentation WWW-clean
104 $(MAKE) -C input WWW-clean
107 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
108 $(SHELL) $(buildscript-dir)/clean-fonts.sh
112 default: $(config_h) builddir-setup
114 builddir-setup: $(builddir)/share/lilypond-force
116 PO_FILES = $(wildcard $(srcdir)/po/*.po)
117 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
118 CATALOGS = $(HELP_CATALOGS:lilypond=)
120 $(builddir)/share/lilypond-force:
121 # Preparing LilyPond tree for builddir exec
122 cd $(builddir) && rm -rf lib share
123 mkdir -p $(builddir)/lib/lilypond
124 mkdir -p $(builddir)/share/lilypond
125 mkdir -p $(builddir)/share/lilypond/fonts
126 mkdir -p $(builddir)/share/lilypond/tex
127 cd $(builddir)/lib/lilypond && \
128 ln -s ../../python/$(outconfbase) python
129 cd $(builddir)/share/lilypond && \
130 ln -s $(abs-srcdir)/ly ly && \
131 ln -s ../../mf/$(outconfbase) dvips && \
132 ln -s ../../mf/$(outconfbase) afm && \
133 ln -s ../../mf/$(outconfbase) tfm && \
134 ln -s $(abs-srcdir)/mf && \
135 ln -s $(abs-srcdir)/ps && \
136 ln -s ../../python/$(outconfbase) python && \
137 ln -s $(abs-srcdir)/scm
138 cd $(builddir)/share/lilypond/tex && \
139 ln -s $(abs-srcdir)/tex source && \
140 ln -s ../../../mf/$(outconfbase) generate
141 cd $(builddir)/share/lilypond/fonts && \
142 ln -s $(abs-srcdir)/mf source && \
143 ln -s ../../../mf/$(outconfbase) afm && \
144 ln -s ../../../mf/$(outconfbase) tfm && \
145 ln -s ../../../mf/$(outconfbase) type1
146 $(foreach i,$(CATALOGS), \
147 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
148 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
149 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
152 local-clean: builddir-setup-clean
153 builddir-setup-clean:
154 cd $(builddir) && rm -rf share
156 $(config_h): configure.in aclocal.m4
158 # this is to prevent people from getting
159 # undefined symbols when we add them to config.h.in,
160 # and they blindly run "cvs update; make".
163 @echo ' *** $(config_h) is out of date'
164 @echo ' *** Remove it and rerun autogen:'
165 @echo ' rm $(config_h); ./autogen.sh'