2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
16 cygwin debian stepmake \
22 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
24 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
25 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS
26 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
27 IN_FILES := $(wildcard *.in)
28 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
29 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
30 $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
31 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
32 INSTALLATION_DIR=$(local_lilypond_datadir)
33 INSTALLATION_FILES=$(config_make) VERSION
37 STEPMAKE_TEMPLATES=toplevel po install
38 include $(depth)/make/stepmake.make
41 $(MAKE) -C Documentation
44 -$(INSTALL) -m 755 -d $(webdir)
45 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
46 # install-WWW does not recurse; fake it visiting Documentation/user manually
47 $(MAKE) -C Documentation/user local-install-WWW
48 $(MAKE) -C Documentation/user install-info
51 $(MAKE) out=www install-WWW
57 $(MAKE) out=www uninstall-WWW=
60 $(INSTALL) -d $(local_lilypond_datadir)
63 @echo '*** Before using LilyPond, the contents of one of the login scripts'
64 @echo '*** buildscripts/out/lilypond-{profile,login} should be sourced.'
65 @echo '*** LilyPond should have been installed to do that automatically'
66 @echo '*** when you log in. So, please log out now and log in again.'
67 @echo '*** For more information see Invoking LilyPond in the manual.'
69 web-ext = gz html midi pdf png txt ly
71 footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
72 footifymail = MAILADDRESS=bug-lilypond@gnu.org
75 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
76 cd $(builddir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
77 cd $(builddir) && find . -name \*.html~ -print | xargs rm -f
78 cd $(builddir) && find Documentation input \
79 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
81 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
82 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
83 cd $(builddir) && ls *.html >> $(outdir)/weblist
84 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
87 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
91 $(MAKE) $(builddir)/share/lilypond-force
93 default: $(config_h) builddir-setup
95 builddir-setup: $(builddir)/share/lilypond-force
97 PO_FILES = $(wildcard $(srcdir)/po/*.po)
98 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
99 CATALOGS = $(HELP_CATALOGS:lilypond=)
101 $(builddir)/share/lilypond-force:
102 # Preparing LilyPond tree for builddir exec
103 cd $(builddir) && rm -rf lib share
104 mkdir -p $(builddir)/lib/$(package)
105 mkdir -p $(builddir)/share/$(package)
106 mkdir -p $(builddir)/share/$(package)/elisp
107 mkdir -p $(builddir)/share/$(package)/fonts
108 mkdir -p $(builddir)/share/$(package)/tex
109 cd $(builddir)/lib/$(package) && \
110 ln -s ../../python/$(outconfbase) python
111 cd $(builddir)/share/$(package) && \
112 ln -s $(abs-srcdir)/ly ly && \
113 ln -s ../../mf/$(outconfbase) dvips && \
114 ln -s ../../mf/$(outconfbase) afm && \
115 ln -s ../../mf/$(outconfbase) tfm && \
116 ln -s $(abs-srcdir)/mf && \
117 ln -s $(abs-srcdir)/ps && \
118 ln -s ../../python/$(outconfbase) python && \
119 ln -s $(abs-srcdir)/scm
120 cd $(builddir)/share/$(package)/tex && \
121 ln -s $(abs-srcdir)/tex source && \
122 ln -s ../../../tex/$(outconfbase) tex-out && \
123 ln -s ../../../mf/$(outconfbase) mf-out
124 cd $(builddir)/share/$(package)/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/$(package)/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'