5 SUBDIRS = python scripts \
12 stepmake $(documentation-dir)
15 ## this convoluted construction is necessary, since we don't know the
16 ## value of DOCUMENTATION here.
17 documentation-dir=$(if $(findstring no,$(DOCUMENTATION)),,Documentation)
19 SCRIPTS = configure autogen.sh smart-autogen.sh smart-configure.sh
20 README_FILES = COPYING DEDICATION ROADMAP THANKS HACKING
21 TOPDOC_FILES = AUTHORS INSTALL README NEWS
22 TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES)))
23 IN_FILES := $(call src-wildcard,*.in)
25 RELEASE_FILES = ChangeLog RELEASE-COMMIT
26 EXTRA_DIST_FILES = $(RELEASE_FILES) VERSION .gitignore lilypond-texi2html.init \
27 $(README_FILES) $(SCRIPTS) $(IN_FILES)
28 INSTALLATION_DIR=$(local_lilypond_datadir)
29 INSTALLATION_FILES=$(config_make) VERSION
33 STEPMAKE_TEMPLATES=toplevel po install
34 LOCALSTEPMAKE_TEMPLATES=lilypond
36 include $(depth)/make/stepmake.make
39 local-dist: refresh-release-files dist-toplevel-txt-files
41 all: $(outdir)/VERSION
43 $(outdir)/VERSION: $(config_make) VERSION
45 echo $(TOPLEVEL_VERSION) > $@
47 ChangeLog: $(outdir)/VERSION
48 @echo 'See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/$(TOPLEVEL_VERSION)-1' > $@
50 RELEASE-COMMIT: # FIXME: any file in $(top-src-dir)/.git/ we can depend on and be sure RELEASE-COMMIT is up to date?
51 git --git-dir=$(top-src-dir)/.git show HEAD | head -100 > $@
53 # junk me as soon as RELEASE-COMMIT FIXME: has been addressed
54 refresh-release-files:
56 test -d $(top-src-dir)/.git && rm -f RELEASE-COMMIT
57 $(MAKE) $(RELEASE_FILES)
62 top-doc: python-modules
64 local-clean: local-clean-ChangeLog
66 local-clean-ChangeLog:
69 dist-toplevel-txt-files: top-doc
71 ln $(TOPDOC_TXT_FILES) $(distdir)/
72 ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
75 $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) out=www info && ) true
78 $(MAKE) out=www COPY_INFO_IMAGES=1 install-info-WWW
81 $(MAKE) -C scripts man install-help2man
82 $(MAKE) -C lily man install-help2man
85 $(MAKE) out=www install-WWW
86 $(MAKE) out=www install-info-WWW
89 $(MAKE) out=www uninstall-WWW
92 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
98 # All web targets, except info image symlinks and info docs are
99 # installed in non-recursing target from TOP-SRC-DIR
101 -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
102 rsync -rl --exclude='*.signature' $(outdir)/offline-root/ $(DESTDIR)$(webdir)
105 $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) install-info && ) true
108 rm -rf $(DESTDIR)$(webdir)
109 -rmdir $(package_docdir)
110 $(MAKE) -C Documentation/user uninstall
111 $(MAKE) -C input/lsr uninstall
114 # For online docs with content negotiation, issue `make doc WEB_TARGETS=online'
115 # For both online and offline docs, issue `make doc WEB_TARGETS="offline online"'
116 WEB_TARGETS = offline
119 # need UTF8 setting in case this is hosted on a website.
120 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
121 $(buildscript-dir)/mutopia-index -o $(outdir)/examples.html input/
122 find $(outdir) -name '*-root' | xargs rm -rf
123 $(buildscript-dir)/www_post $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(outdir) "$(WEB_TARGETS)"
124 find $(outdir)/offline-root -type l -delete
128 tree-prefix = $(outdir)
129 tree-bin = $(tree-prefix)/bin
130 tree-lib = $(tree-prefix)/lib
131 tree-share = $(tree-prefix)/share
133 # Don't put version numbers here. During development
134 # they make no sense, and cause EPS files to become invalid.
136 tree-share-prefix = $(tree-share)/lilypond/current
137 tree-lib-prefix = $(tree-lib)/lilypond/current
141 $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
143 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
145 doc-clean: snippets-clean $(tree-share-prefix)/lilypond-force
147 default: $(config_h) build-dir-setup
149 build-dir-setup: $(tree-share-prefix)/lilypond-force
151 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
152 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
153 CATALOGS = $(HELP_CATALOGS:lilypond=)
155 $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION
156 # Preparing LilyPond tree for build-dir exec
157 cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
159 mkdir -p $(tree-share-prefix)
160 mkdir -p $(tree-lib-prefix)
161 mkdir -p $(tree-share-prefix)/elisp
162 mkdir -p $(tree-share-prefix)/fonts
163 mkdir -p $(tree-share-prefix)/fonts/otf
164 mkdir -p $(tree-share-prefix)/fonts/tfm
165 mkdir -p $(tree-share-prefix)/fonts/type1
166 mkdir -p $(tree-share-prefix)/fonts/svg
167 mkdir -p $(tree-share-prefix)/fonts/map
168 mkdir -p $(tree-share-prefix)/fonts/enc
169 mkdir -p $(tree-share-prefix)/tex
171 ln -sf ../../lily/$(outconfbase)/lilypond . && \
172 for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
173 do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
174 cd $(tree-lib-prefix) && \
175 ln -s ../../../../python/$(outconfbase) python
176 cd $(tree-share-prefix) && \
177 ln -s $(top-src-dir)/ly ly && \
178 ln -s ../../../../mf mf && \
179 ln -s $(top-src-dir)/ps && \
180 ln -s ../../../../python/$(outconfbase) python && \
181 ln -s $(top-src-dir)/scm && \
182 ln -s $(top-src-dir)/scripts scripts
183 cd $(tree-share-prefix)/tex && \
184 ln -s $(top-src-dir)/tex source && \
185 ln -s ../../../../../tex/$(outconfbase) tex-out && \
187 cd $(tree-share-prefix)/fonts && \
188 ln -s $(top-src-dir)/mf source && \
190 -cd $(tree-share-prefix)/elisp && \
191 ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
192 ln -s $(top-src-dir)/elisp/*.el .
193 $(foreach i,$(CATALOGS), \
194 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
195 cd $(tree-share)/locale/$i/LC_MESSAGES && \
196 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
197 touch $(tree-share-prefix)/lilypond-force
199 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
200 -rm -f $(tree-share-prefix)/fonts/otf/* && \
201 rm -f $(tree-share-prefix)/fonts/svg/* && \
202 rm -f $(tree-share-prefix)/fonts/fonts.conf && \
203 rm -f $(tree-share-prefix)/fonts/tfm/* && \
204 rm -f $(tree-share-prefix)/fonts/type1/* && \
205 cd $(tree-share-prefix)/fonts/otf && \
206 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
207 -cd $(tree-share-prefix)/fonts/ && \
208 ln -s ../../../../../mf/$(outconfbase)/fonts.conf .
209 -cd $(tree-share-prefix)/fonts/svg && \
210 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
211 -cd $(tree-share-prefix)/fonts/tfm && \
212 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
213 -cd $(tree-share-prefix)/fonts/type1 && \
214 ln -s ../../../../../../mf/$(outconfbase)/*.pf? .
217 etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
219 $(config_h): config.hh.in
221 # this is to prevent people from getting
222 # undefined symbols when we add them to config.h.in,
223 # and they blindly run "cvs update; make".
226 @echo ' *** $(config_h) is out of date'
227 @echo ' *** Remove it and rerun autogen:'
228 @echo ' rm $(config_h); ./autogen.sh'
233 $(MAKE) -C scripts/build
234 PATH=$(buildscript-dir):$(PATH) $(buildscript-dir)/grand-replace
236 ################################################################
239 RESULT_DIR=$(top-build-dir)/out/test-results
243 @echo -en 'For tracking crashes: use\n\n\t'
244 @echo 'grep sourcefilename `grep -L systems.texi out/lybook-db/*/*log|sed s/log/ly/g`'
246 $(MAKE) -C input/regression/ out=test local-test
247 $(MAKE) -C input/regression/musicxml out=test local-test
250 @if test -d .git ; then \
251 $(if $(shell git diff), echo "commit before base lining" && false,true) ; \
255 $(MAKE) out=test -C input/regression/ local-test-baseline
256 $(MAKE) out=test -C input/regression/musicxml local-test-baseline
257 $(MAKE) test-snippets-clean
262 mkdir -p $(RESULT_DIR)
263 $(buildscript-dir)/output-distance --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/
264 @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g'
268 for a in `cat $(RESULT_DIR)/changed.txt` ; do \
269 echo removing $$a* ; \
274 test-clean: test-snippets-clean
275 $(MAKE) -C input/regression/ out=test clean
281 rm -rf out/lybook-testdb