2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
15 cygwin debian 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 cd $(builddir) && $(PYTHON) $(buildscript-dir)/lilypond.words.py $(outdir)
40 -$(INSTALL) -m 755 -d $(webdir)
41 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
44 $(INSTALL) -d $(local_lilypond_datadir)
48 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
49 @echo " *** must be run. You're advised to source these scripts from your "
50 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
53 web-ext = gz html midi pdf png txt ly
55 footify = MAILADDRESS=bug-lilypond@gnu.org $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
58 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
61 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
62 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
63 cd $(builddir) && rm -f `find . -name \*.html~ -print`
64 cd $(builddir) && find Documentation input \
65 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
67 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
68 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
69 cd $(builddir) && ls *.html >> $(outdir)/weblist
70 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
73 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
76 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
79 $(SHELL) $(buildscript-dir)/clean-fonts.sh
81 $(MAKE) $(builddir)/share/lilypond-force
84 default: $(config_h) builddir-setup
86 builddir-setup: $(builddir)/share/lilypond-force
88 PO_FILES = $(wildcard $(srcdir)/po/*.po)
89 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
90 CATALOGS = $(HELP_CATALOGS:lilypond=)
92 $(builddir)/share/lilypond-force:
93 # Preparing LilyPond tree for builddir exec
94 cd $(builddir) && rm -rf lib share
95 mkdir -p $(builddir)/lib/lilypond
96 mkdir -p $(builddir)/share/lilypond
97 mkdir -p $(builddir)/share/lilypond/fonts
98 mkdir -p $(builddir)/share/lilypond/tex
99 cd $(builddir)/lib/lilypond && \
100 ln -s ../../python/$(outconfbase) python
101 cd $(builddir)/share/lilypond && \
102 ln -s $(abs-srcdir)/ly ly && \
103 ln -s ../../mf/$(outconfbase) dvips && \
104 ln -s ../../mf/$(outconfbase) afm && \
105 ln -s ../../mf/$(outconfbase) tfm && \
106 ln -s $(abs-srcdir)/mf && \
107 ln -s $(abs-srcdir)/ps && \
108 ln -s ../../python/$(outconfbase) python && \
109 ln -s $(abs-srcdir)/scm
110 cd $(builddir)/share/lilypond/tex && \
111 ln -s $(abs-srcdir)/tex source && \
112 ln -s ../../../mf/$(outconfbase) generate
113 cd $(builddir)/share/lilypond/fonts && \
114 ln -s $(abs-srcdir)/mf source && \
115 ln -s ../../../mf/$(outconfbase) afm && \
116 ln -s ../../../mf/$(outconfbase) tfm && \
117 ln -s ../../../mf/$(outconfbase) type1
118 $(foreach i,$(CATALOGS), \
119 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
120 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
121 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
124 local-clean: builddir-setup-clean
125 builddir-setup-clean:
126 cd $(builddir) && rm -rf share
128 $(config_h): config.hh.in
130 # this is to prevent people from getting
131 # undefined symbols when we add them to config.h.in,
132 # and they blindly run "cvs update; make".
135 @echo ' *** $(config_h) is out of date'
136 @echo ' *** Remove it and rerun autogen:'
137 @echo ' rm $(config_h); ./autogen.sh'
142 # maybe move into private script?
144 cd out-www && mkdir web && tar -xzf web.tar.gz -C web
146 chgrp -R lilypond . && \
148 chmod 2775 `find -type d` . && \
149 rsync --delete --stats --progress -gorltvu -e ssh . x:/var/www/lilypond/doc/v1.9/
150 cd out-www && rm -rf web/