5 SUBDIRS = buildscripts python scripts \
6 flower kpath-guile lily \
14 ifneq ($(strip $(DOCUMENTATION)),no)
15 SUBDIRS += Documentation
18 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh Doxyfile
19 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
20 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
21 IN_FILES := $(call src-wildcard,*.in)
22 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
23 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
24 $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
25 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
26 INSTALLATION_DIR=$(local_lilypond_datadir)
27 INSTALLATION_FILES=$(config_make) VERSION
31 STEPMAKE_TEMPLATES=toplevel po install
32 include $(depth)/make/stepmake.make
35 $(MAKE) -C Documentation
38 -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
39 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
40 # install-WWW does not recurse; fake it visiting Documentation/user manually
41 $(MAKE) -C Documentation/user local-install-WWW
42 $(MAKE) -C Documentation/user install-info
45 $(MAKE) out=www install-WWW
51 $(MAKE) out=www uninstall-WWW=
54 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
59 web-ext = html midi pdf png txt ly
61 footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
62 footifymail = MAILADDRESS=bug-lilypond@gnu.org
65 # need UTF8 setting in case this is hosted on a website.
66 echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess
67 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html ./
68 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/index.html">' > $(outdir)/index.html
69 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(outdir)/index.html
71 cd $(top-build-dir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
72 cd $(top-build-dir) && find . -name \*.html~ -print | xargs rm -f
73 cd $(top-build-dir) && find Documentation input \
74 $(web-ext:%=-path '*/out-www/*.%' -or) -type l \
76 ls $(outdir)/*.html >> $(outdir)/weblist
78 ## rewrite paths so we lose out-www
79 rm -rf $(outdir)/web-root/
80 mkdir $(outdir)/web-root/
81 cat $(outdir)/weblist | (cd $(top-build-dir); tar -cf- -T- ) | \
82 tar -C $(outdir)/web-root/ -xf -
83 cd $(outdir)/web-root/ && \
84 for a in `find -name out-www`; do \
89 tree-prefix = $(outdir)
90 tree-bin = $(tree-prefix)/bin
91 tree-lib = $(tree-prefix)/lib
92 tree-share = $(tree-prefix)/share
93 tree-share-prefix = $(tree-share)/lilypond/$(TOPLEVEL_VERSION)
94 tree-lib-prefix = $(tree-lib)/lilypond/$(TOPLEVEL_VERSION)
96 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
100 $(MAKE) $(tree-share-prefix)/lilypond-force
102 default: $(config_h) build-dir-setup
104 build-dir-setup: $(tree-share-prefix)/lilypond-force
106 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
107 HELP_CATALOGS = $(PO_FILES:$(src-depth)/po/%.po=%)
108 CATALOGS = $(HELP_CATALOGS:lilypond=)
110 $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile
111 # Preparing LilyPond tree for build-dir exec
112 cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
114 mkdir -p $(tree-share-prefix)
115 mkdir -p $(tree-lib-prefix)
116 (cd $(tree-lib)/lilypond/ && ln -sf $(TOPLEVEL_VERSION) current)
117 (cd $(tree-share)/lilypond/ && ln -sf $(TOPLEVEL_VERSION) current)
118 mkdir -p $(tree-share-prefix)/dvips
119 mkdir -p $(tree-share-prefix)/elisp
120 mkdir -p $(tree-share-prefix)/fonts
121 mkdir -p $(tree-share-prefix)/fonts/otf
122 mkdir -p $(tree-share-prefix)/fonts/tfm
123 mkdir -p $(tree-share-prefix)/fonts/type1
124 mkdir -p $(tree-share-prefix)/fonts/svg
125 mkdir -p $(tree-share-prefix)/fonts/map
126 mkdir -p $(tree-share-prefix)/fonts/enc
127 mkdir -p $(tree-share-prefix)/tex
129 ln -sf ../../lily/$(outconfbase)/lilypond . && \
130 ln -sf ../../scripts/$(outconfbase)/convert-ly . && \
131 ln -sf ../../scripts/$(outconfbase)/lilypond-book . && \
132 ln -sf ../../scripts/$(outconfbase)/*.ly .
133 cd $(tree-lib-prefix) && \
134 ln -s ../../../../python/$(outconfbase) python
135 cd $(tree-share-prefix) && \
136 ln -s $(top-src-dir)/ly ly && \
137 ln -s ../../../../mf mf && \
138 ln -s $(top-src-dir)/ps && \
139 ln -s ../../../../python/$(outconfbase) python && \
140 ln -s $(top-src-dir)/scm && \
141 ln -s $(top-src-dir)/scripts scripts
142 cd $(tree-share-prefix)/dvips && \
143 ln -s ./../../../mf/$(outconfbase) mf-out && \
144 ln -s $(top-src-dir)/ps
145 cd $(tree-share-prefix)/tex && \
146 ln -s $(top-src-dir)/tex source && \
147 ln -s ../../../../../tex/$(outconfbase) tex-out && \
148 ln -s ../../../../../mf/$(outconfbase) mf-out
149 -cd $(tree-share-prefix)/fonts/otf && \
150 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
151 -cd $(tree-share-prefix)/fonts/svg && \
152 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
153 -cd $(tree-share-prefix)/fonts/tfm && \
154 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
155 -cd $(tree-share-prefix)/fonts/type1 && \
156 ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
157 cd $(tree-share-prefix)/fonts && \
158 ln -s $(top-src-dir)/mf source && \
160 -cd $(tree-share-prefix)/elisp && \
161 ln -sf ../../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
162 ln -s $(top-src-dir)/elisp/*.el .
163 $(foreach i,$(CATALOGS), \
164 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
165 cd $(tree-share)/locale/$i/LC_MESSAGES && \
166 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
168 touch $(tree-share-prefix)/lilypond-force
170 local-clean: build-dir-setup-clean
171 build-dir-setup-clean:
172 cd $(top-build-dir) && rm -rf share
174 $(config_h): config.hh.in
176 # this is to prevent people from getting
177 # undefined symbols when we add them to config.h.in,
178 # and they blindly run "cvs update; make".
181 @echo ' *** $(config_h) is out of date'
182 @echo ' *** Remove it and rerun autogen:'
183 @echo ' rm $(config_h); ./autogen.sh'