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 ROADMAP THANKS
21 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
22 IN_FILES := $(wildcard *.in)
23 EXTRA_DIST_FILES = $(wildcard *.el) VERSION lilypond.vim vimrc $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch server.el.patch darwin.patch .cvsignore lexer-gcc-3.1.sh
24 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
25 INSTALLATION_DIR=$(local_lilypond_datadir)
26 INSTALLATION_FILES=$(config_make) VERSION
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make
34 $(MAKE) -C Documentation
37 $(MAKE) MAKE_PFA_FILES=1 -C mf
38 # don't make fontball - we have binary packages for that.
41 $(MAKE) MAKE_PFA_FILES=1 -C mf install
43 fontball=type1-$(TOPLEVEL_VERSION).tar.gz
44 deb=lilypond_$(TOPLEVEL_VERSION)-1_i386.deb
45 debian-mirror=http://ftp.$(LANG).debian.org
48 wget -P $(outdir) $(debian-mirror)/debian/pool/main/l/lilypond/$(deb)
50 #lld=.$(local_lilypond_datadir)
51 lld=./usr/share/lilypond/$(TOPLEVEL_VERSION)
52 $(outdir)/$(fontball): $(outdir)/$(deb)
53 rm -rf $(outdir)/./usr
54 ar p $< data.tar.gz | \
55 tar -C $(outdir) -zxf - $(lld)/dvips $(lld)/fonts/type1
56 # strip the $(lld) part?
57 tar -C $(outdir) -czf $@ ./usr
59 get-pfa-fonts: $(outdir)/$(fontball)
60 # install by hand from $<
63 cd $(builddir) && $(PYTHON) $(buildscript-dir)/lilypond.words.py $(outdir)/lilypond.words
66 -$(INSTALL) -m 755 -d $(webdir)
67 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
70 $(INSTALL) -d $(local_lilypond_datadir)
74 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
75 @echo " *** must be run. You're advised to source these scripts from your "
76 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
79 web-ext = gz html midi pdf png txt ly
81 footify = MAILADDRESS=bug-lilypond@gnu.org $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
84 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
87 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
88 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
89 cd $(builddir) && rm -f `find . -name \*.html~ -print`
90 cd $(builddir) && find Documentation input \
91 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
93 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
94 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
95 cd $(builddir) && ls *.html >> $(outdir)/weblist
96 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
99 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
102 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
105 $(SHELL) $(buildscript-dir)/clean-fonts.sh
106 $(MAKE) out=www clean
107 $(MAKE) $(builddir)/share/lilypond-force
110 default: $(config_h) builddir-setup
112 builddir-setup: $(builddir)/share/lilypond-force
114 PO_FILES = $(wildcard $(srcdir)/po/*.po)
115 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
116 CATALOGS = $(HELP_CATALOGS:lilypond=)
118 $(builddir)/share/lilypond-force:
119 # Preparing LilyPond tree for builddir exec
120 cd $(builddir) && rm -rf lib share
121 mkdir -p $(builddir)/lib/lilypond
122 mkdir -p $(builddir)/share/lilypond
123 mkdir -p $(builddir)/share/lilypond/fonts
124 mkdir -p $(builddir)/share/lilypond/tex
125 cd $(builddir)/lib/lilypond && \
126 ln -s ../../python/$(outconfbase) python
127 cd $(builddir)/share/lilypond && \
128 ln -s $(abs-srcdir)/ly ly && \
129 ln -s ../../mf/$(outconfbase) dvips && \
130 ln -s ../../mf/$(outconfbase) afm && \
131 ln -s ../../mf/$(outconfbase) tfm && \
132 ln -s $(abs-srcdir)/mf && \
133 ln -s $(abs-srcdir)/ps && \
134 ln -s ../../python/$(outconfbase) python && \
135 ln -s $(abs-srcdir)/scm
136 cd $(builddir)/share/lilypond/tex && \
137 ln -s $(abs-srcdir)/tex source && \
138 ln -s ../../../mf/$(outconfbase) generate
139 cd $(builddir)/share/lilypond/fonts && \
140 ln -s $(abs-srcdir)/mf source && \
141 ln -s ../../../mf/$(outconfbase) afm && \
142 ln -s ../../../mf/$(outconfbase) tfm && \
143 ln -s ../../../mf/$(outconfbase) type1
144 $(foreach i,$(CATALOGS), \
145 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
146 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
147 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
150 local-clean: builddir-setup-clean
151 builddir-setup-clean:
152 cd $(builddir) && rm -rf share
154 $(config_h): configure.in aclocal.m4
156 # this is to prevent people from getting
157 # undefined symbols when we add them to config.h.in,
158 # and they blindly run "cvs update; make".
161 @echo ' *** $(config_h) is out of date'
162 @echo ' *** Remove it and rerun autogen:'
163 @echo ' rm $(config_h); ./autogen.sh'
168 # maybe move into private script?
170 cd out-www && mkdir web && tar -xzf web.tar.gz -C web
171 cd out-www/web && rsync --delete --stats --progress -rltvu -e ssh . x:/var/www/lilypond/doc/v1.9/
172 cd out-www && rm -rf web/