Nitpick: ly:spanner-bound grob name slur -> spanner.
[lilypond.git] / GNUmakefile.in
blobfec79a01d2f8fb2163a76769ed836d2b156c0b4b
1 # -*-Makefile-*-
3 depth = .
5 SUBDIRS = python scripts \
6 flower lily \
7 mf ly \
8 tex ps scm \
9 po make \
10 elisp vim \
11 input \
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 EXTRA_DIST_FILES = VERSION .gitignore lilypond-texi2html.init \
26 $(README_FILES) $(SCRIPTS) $(IN_FILES)
27 INSTALLATION_DIR=$(local_lilypond_datadir)
28 INSTALLATION_FILES=$(config_make) VERSION
30 # bootstrap stepmake:
32 STEPMAKE_TEMPLATES=toplevel po install
33 LOCALSTEPMAKE_TEMPLATES=lilypond
35 include $(depth)/make/stepmake.make
38 local-dist: dist-toplevel-txt-files
40 all: $(outdir)/VERSION
42 $(outdir)/VERSION: $(config_make) VERSION
43 -mkdir -p $(outdir)
44 echo $(TOPLEVEL_VERSION) > $@
46 ChangeLog: $(outdir)/VERSION
47 @echo 'See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/$(TOPLEVEL_VERSION)-1' > ChangeLog
49 python-modules:
50 $(MAKE) -C python
52 top-doc: python-modules
54 local-clean: local-clean-ChangeLog
56 local-clean-ChangeLog:
57 rm -f ChangeLog
59 dist-toplevel-txt-files: top-doc
60 -mkdir -p $(distdir)
61 ln $(TOPDOC_TXT_FILES) $(distdir)/
62 ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
64 info:
65 $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) out=www info && ) true
67 install-info: info
68 $(MAKE) out=www COPY_INFO_IMAGES=1 install-info-WWW
70 install-help2man:
71 $(MAKE) -C scripts man install-help2man
72 $(MAKE) -C lily man install-help2man
74 install-doc:
75 $(MAKE) out=www install-WWW
76 $(MAKE) out=www install-info-WWW
78 uninstall-doc:
79 $(MAKE) out=www uninstall-WWW
81 local-install:
82 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
84 final-install:
85 @true
87 ifeq ($(out),www)
88 # All web targets, except info image symlinks and info docs are
89 # installed in non-recursing target from TOP-SRC-DIR
90 install-WWW:
91 -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
92 rsync -rl --exclude='*.signature' $(outdir)/offline-root/ $(DESTDIR)$(webdir)
94 install-info-WWW:
95 $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) install-info && ) true
97 uninstall-WWW:
98 rm -rf $(DESTDIR)$(webdir)
99 -rmdir $(package_docdir)
100 $(MAKE) -C Documentation/user uninstall
101 $(MAKE) -C input/lsr uninstall
104 # For online docs with content negotiation, issue `make web WEB_TARGETS=online'
105 # For both online and offline docs, issue `make web WEB_TARGETS="offline online"'
106 WEB_TARGETS = offline
108 WWW-post:
109 # need UTF8 setting in case this is hosted on a website.
110 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
111 $(buildscript-dir)/mutopia-index -o $(outdir)/examples.html input/
112 find $(outdir) -name '*-root' | xargs rm -rf
113 $(buildscript-dir)/www_post $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(outdir) "$(WEB_TARGETS)"
114 find $(outdir)/offline-root -type l -delete
115 endif
118 tree-prefix = $(outdir)
119 tree-bin = $(tree-prefix)/bin
120 tree-lib = $(tree-prefix)/lib
121 tree-share = $(tree-prefix)/share
123 # Don't put version numbers here. During development
124 # they make no sense, and cause EPS files to become invalid.
126 tree-share-prefix = $(tree-share)/lilypond/current
127 tree-lib-prefix = $(tree-lib)/lilypond/current
129 C_DIRS = flower lily
130 c-clean:
131 $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
133 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
135 doc-clean: snippets-clean $(tree-share-prefix)/lilypond-force
137 default: $(config_h) build-dir-setup
139 build-dir-setup: $(tree-share-prefix)/lilypond-force
141 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
142 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
143 CATALOGS = $(HELP_CATALOGS:lilypond=)
145 $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION
146 # Preparing LilyPond tree for build-dir exec
147 cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
148 mkdir -p $(tree-bin)
149 mkdir -p $(tree-share-prefix)
150 mkdir -p $(tree-lib-prefix)
151 mkdir -p $(tree-share-prefix)/elisp
152 mkdir -p $(tree-share-prefix)/fonts
153 mkdir -p $(tree-share-prefix)/fonts/otf
154 mkdir -p $(tree-share-prefix)/fonts/tfm
155 mkdir -p $(tree-share-prefix)/fonts/type1
156 mkdir -p $(tree-share-prefix)/fonts/svg
157 mkdir -p $(tree-share-prefix)/fonts/map
158 mkdir -p $(tree-share-prefix)/fonts/enc
159 mkdir -p $(tree-share-prefix)/tex
160 cd $(tree-bin) && \
161 ln -sf ../../lily/$(outconfbase)/lilypond . && \
162 for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
163 do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
164 cd $(tree-lib-prefix) && \
165 ln -s ../../../../python/$(outconfbase) python
166 cd $(tree-share-prefix) && \
167 ln -s $(top-src-dir)/ly ly && \
168 ln -s ../../../../mf mf && \
169 ln -s $(top-src-dir)/ps && \
170 ln -s ../../../../python/$(outconfbase) python && \
171 ln -s $(top-src-dir)/scm && \
172 ln -s $(top-src-dir)/scripts scripts
173 cd $(tree-share-prefix)/tex && \
174 ln -s $(top-src-dir)/tex source && \
175 ln -s ../../../../../tex/$(outconfbase) tex-out && \
176 true
177 cd $(tree-share-prefix)/fonts && \
178 ln -s $(top-src-dir)/mf source && \
179 true
180 -cd $(tree-share-prefix)/elisp && \
181 ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
182 ln -s $(top-src-dir)/elisp/*.el .
183 $(foreach i,$(CATALOGS), \
184 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
185 cd $(tree-share)/locale/$i/LC_MESSAGES && \
186 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
187 touch $(tree-share-prefix)/lilypond-force
189 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
190 -rm -f $(tree-share-prefix)/fonts/otf/* && \
191 rm -f $(tree-share-prefix)/fonts/svg/* && \
192 rm -f $(tree-share-prefix)/fonts/fonts.conf && \
193 rm -f $(tree-share-prefix)/fonts/tfm/* && \
194 rm -f $(tree-share-prefix)/fonts/type1/* && \
195 cd $(tree-share-prefix)/fonts/otf && \
196 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
197 -cd $(tree-share-prefix)/fonts/ && \
198 ln -s ../../../../../mf/$(outconfbase)/fonts.conf .
199 -cd $(tree-share-prefix)/fonts/svg && \
200 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
201 -cd $(tree-share-prefix)/fonts/tfm && \
202 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
203 -cd $(tree-share-prefix)/fonts/type1 && \
204 ln -s ../../../../../../mf/$(outconfbase)/*.pf? .
206 TAGS.make: dummy
207 etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
209 $(config_h): config.hh.in
211 # this is to prevent people from getting
212 # undefined symbols when we add them to config.h.in,
213 # and they blindly run "cvs update; make".
215 @echo
216 @echo ' *** $(config_h) is out of date'
217 @echo ' *** Remove it and rerun autogen:'
218 @echo ' rm $(config_h); ./autogen.sh'
219 @echo
220 @false
222 grand-replace:
223 $(MAKE) -C scripts/build
224 PATH=$(buildscript-dir):$(PATH) $(buildscript-dir)/grand-replace
226 ################################################################
227 # testing
229 RESULT_DIR=$(top-build-dir)/out/test-results
232 test:
233 @echo -en 'For tracking crashes: use\n\n\t'
234 @echo 'grep sourcefilename `grep -L systems.texi out/lybook-db/*/*log|sed s/log/ly/g`'
235 @echo
236 $(MAKE) -C input/regression/ out=test local-test
237 $(MAKE) -C input/regression/musicxml out=test local-test
239 test-baseline:
240 @if test -d .git ; then \
241 $(if $(shell git diff), echo "commit before base lining" && false,true) ; \
243 $(MAKE)
244 $(MAKE) test
245 $(MAKE) out=test -C input/regression/ local-test-baseline
246 $(MAKE) out=test -C input/regression/musicxml local-test-baseline
247 $(MAKE) test-snippets-clean
250 local-check: test
251 rm -rf $(RESULT_DIR)
252 mkdir -p $(RESULT_DIR)
253 $(buildscript-dir)/output-distance --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/
254 @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g'
257 test-redo:
258 for a in `cat $(RESULT_DIR)/changed.txt` ; do \
259 echo removing $$a* ; \
260 rm -f $$a* ;\
261 done
262 $(MAKE) check
264 test-clean: test-snippets-clean
265 $(MAKE) -C input/regression/ out=test clean
267 snippets-clean:
268 rm -rf out/lybook-db
270 test-snippets-clean:
271 rm -rf out/lybook-testdb