2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
16 cygwin debian stepmake \
20 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
21 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS
22 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
23 IN_FILES := $(wildcard *.in)
24 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
25 VIM_FILES = vimrc lilypond.vim
26 EXTRA_DIST_FILES = VERSION .cvsignore $(README_FILES) $(SCRIPTS) $(IN_FILES) \
27 $(PATCH_FILES) $(VIM_FILES)
28 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
29 INSTALLATION_DIR=$(local_lilypond_datadir)
30 INSTALLATION_FILES=$(config_make) VERSION
34 STEPMAKE_TEMPLATES=toplevel po install
35 include $(depth)/make/stepmake.make
38 $(MAKE) -C Documentation
41 -$(INSTALL) -m 755 -d $(webdir)
42 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
43 # install-WWW does not recurse; fake it visiting Documentation/user manually
44 $(MAKE) -C Documentation/user local-install-WWW
47 $(MAKE) out=www install-WWW
54 $(MAKE) out=www uninstall-WWW=
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 web-ext = gz html midi pdf png txt ly
68 footify = MAILADDRESS=bug-lilypond@gnu.org $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
71 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
72 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
73 cd $(builddir) && rm -f `find . -name \*.html~ -print`
74 cd $(builddir) && find Documentation input \
75 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
77 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
78 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
79 cd $(builddir) && ls *.html >> $(outdir)/weblist
80 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
83 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
85 # FIXME: rename to TAGS; should include deeper TAGS files, see guile-core
87 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false \
92 $(MAKE) $(builddir)/share/lilypond-force
94 default: $(config_h) builddir-setup
96 builddir-setup: $(builddir)/share/lilypond-force
98 PO_FILES = $(wildcard $(srcdir)/po/*.po)
99 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
100 CATALOGS = $(HELP_CATALOGS:lilypond=)
102 $(builddir)/share/lilypond-force:
103 # Preparing LilyPond tree for builddir exec
104 cd $(builddir) && rm -rf lib share
105 mkdir -p $(builddir)/lib/lilypond
106 mkdir -p $(builddir)/share/lilypond
107 mkdir -p $(builddir)/share/lilypond/elisp
108 mkdir -p $(builddir)/share/lilypond/fonts
109 mkdir -p $(builddir)/share/lilypond/tex
110 cd $(builddir)/lib/lilypond && \
111 ln -s ../../python/$(outconfbase) python
112 cd $(builddir)/share/lilypond && \
113 ln -s $(abs-srcdir)/ly ly && \
114 ln -s ../../mf/$(outconfbase) dvips && \
115 ln -s ../../mf/$(outconfbase) afm && \
116 ln -s ../../mf/$(outconfbase) tfm && \
117 ln -s $(abs-srcdir)/mf && \
118 ln -s $(abs-srcdir)/ps && \
119 ln -s ../../python/$(outconfbase) python && \
120 ln -s $(abs-srcdir)/scm
121 cd $(builddir)/share/lilypond/tex && \
122 ln -s $(abs-srcdir)/tex source && \
123 ln -s ../../../mf/$(outconfbase) generate
124 cd $(builddir)/share/lilypond/fonts && \
125 ln -s $(abs-srcdir)/mf source && \
126 ln -s ../../../mf/$(outconfbase) afm && \
127 ln -s ../../../mf/$(outconfbase) tfm && \
128 ln -s ../../../mf/$(outconfbase) type1
129 cd $(builddir)/share/lilypond/elisp && \
130 ln -sf ../../../elisp/$(outconfbase)/lilypond.words.el . && \
131 ln -s $(abs-srcdir)/elisp/*.el .
132 $(foreach i,$(CATALOGS), \
133 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
134 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
135 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
138 local-clean: builddir-setup-clean
139 builddir-setup-clean:
140 cd $(builddir) && rm -rf share
142 $(config_h): config.hh.in
144 # this is to prevent people from getting
145 # undefined symbols when we add them to config.h.in,
146 # and they blindly run "cvs update; make".
149 @echo ' *** $(config_h) is out of date'
150 @echo ' *** Remove it and rerun autogen:'
151 @echo ' rm $(config_h); ./autogen.sh'