Typo
[lilypond.git] / GNUmakefile.in
blob92f33fb18ada3db9a4d24f7bf156a26536709b29
1 # -*-Makefile-*-
3 depth = .
5 SUBDIRS = buildscripts 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 SConstruct \
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 dist-toplevel-txt-files:
47 -mkdir -p $(distdir)
48 ln $(TOPDOC_TXT_FILES) $(distdir)/
49 ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
51 doc:
52 $(MAKE) -C Documentation
54 install-WWW:
55 -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
56 rsync -rl $(outdir)/offline-root/ $(DESTDIR)$(webdir)
57 $(MAKE) -C Documentation/user local-install-WWW
58 $(MAKE) -C Documentation/user install-info
59 $(MAKE) -C input/lsr install-info
61 install-help2man:
62 $(MAKE) -C scripts man install-help2man
63 $(MAKE) -C lily man install-help2man
65 web-install:
66 $(MAKE) out=www install-WWW
68 uninstall-WWW:
69 echo TODO
71 web-uninstall:
72 $(MAKE) out=www uninstall-WWW
74 local-install:
75 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
77 final-install:
78 @true
81 # For online docs with content negotiation, issue `make web WEB_TARGETS=online'
82 # For both online and offline docs, issue `make web WEB_TARGETS="offline online"'
83 WEB_TARGETS = offline
85 local-WWW-post:
86 # need UTF8 setting in case this is hosted on a website.
87 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
88 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/
89 find $(outdir) -name '*-root' | xargs rm -rf
90 $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(outdir) "$(WEB_TARGETS)"
91 find $(outdir)/offline-root -type l -delete
94 tree-prefix = $(outdir)
95 tree-bin = $(tree-prefix)/bin
96 tree-lib = $(tree-prefix)/lib
97 tree-share = $(tree-prefix)/share
99 # Don't put version numbers here. During development
100 # they make no sense, and cause EPS files to become invalid.
102 tree-share-prefix = $(tree-share)/lilypond/current
103 tree-lib-prefix = $(tree-lib)/lilypond/current
105 C_DIRS = flower lily
106 c-clean:
107 $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
109 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
111 web-clean:
112 $(MAKE) out=www clean
113 $(MAKE) $(tree-share-prefix)/lilypond-force
115 default: $(config_h) build-dir-setup
117 build-dir-setup: $(tree-share-prefix)/lilypond-force
119 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
120 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
121 CATALOGS = $(HELP_CATALOGS:lilypond=)
123 $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION
124 # Preparing LilyPond tree for build-dir exec
125 cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
126 mkdir -p $(tree-bin)
127 mkdir -p $(tree-share-prefix)
128 mkdir -p $(tree-lib-prefix)
129 mkdir -p $(tree-share-prefix)/elisp
130 mkdir -p $(tree-share-prefix)/fonts
131 mkdir -p $(tree-share-prefix)/fonts/otf
132 mkdir -p $(tree-share-prefix)/fonts/tfm
133 mkdir -p $(tree-share-prefix)/fonts/type1
134 mkdir -p $(tree-share-prefix)/fonts/svg
135 mkdir -p $(tree-share-prefix)/fonts/map
136 mkdir -p $(tree-share-prefix)/fonts/enc
137 mkdir -p $(tree-share-prefix)/tex
138 cd $(tree-bin) && \
139 ln -sf ../../lily/$(outconfbase)/lilypond . && \
140 for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
141 do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
142 cd $(tree-lib-prefix) && \
143 ln -s ../../../../python/$(outconfbase) python
144 cd $(tree-share-prefix) && \
145 ln -s $(top-src-dir)/ly ly && \
146 ln -s ../../../../mf mf && \
147 ln -s $(top-src-dir)/ps && \
148 ln -s ../../../../python/$(outconfbase) python && \
149 ln -s $(top-src-dir)/scm && \
150 ln -s $(top-src-dir)/scripts scripts
151 cd $(tree-share-prefix)/tex && \
152 ln -s $(top-src-dir)/tex source && \
153 ln -s ../../../../../tex/$(outconfbase) tex-out && \
154 true
155 cd $(tree-share-prefix)/fonts && \
156 ln -s $(top-src-dir)/mf source && \
157 true
158 -cd $(tree-share-prefix)/elisp && \
159 ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
160 ln -s $(top-src-dir)/elisp/*.el .
161 $(foreach i,$(CATALOGS), \
162 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
163 cd $(tree-share)/locale/$i/LC_MESSAGES && \
164 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
165 touch $(tree-share-prefix)/lilypond-force
167 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
168 -rm -f $(tree-share-prefix)/fonts/otf/* && \
169 rm -f $(tree-share-prefix)/fonts/svg/* && \
170 rm -f $(tree-share-prefix)/fonts/fonts.conf && \
171 rm -f $(tree-share-prefix)/fonts/tfm/* && \
172 rm -f $(tree-share-prefix)/fonts/type1/* && \
173 cd $(tree-share-prefix)/fonts/otf && \
174 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
175 -cd $(tree-share-prefix)/fonts/ && \
176 ln -s ../../../../../mf/$(outconfbase)/fonts.conf .
177 -cd $(tree-share-prefix)/fonts/svg && \
178 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
179 -cd $(tree-share-prefix)/fonts/tfm && \
180 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
181 -cd $(tree-share-prefix)/fonts/type1 && \
182 ln -s ../../../../../../mf/$(outconfbase)/*.pf? .
184 TAGS.make: dummy
185 etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
187 $(config_h): config.hh.in
189 # this is to prevent people from getting
190 # undefined symbols when we add them to config.h.in,
191 # and they blindly run "cvs update; make".
193 @echo
194 @echo ' *** $(config_h) is out of date'
195 @echo ' *** Remove it and rerun autogen:'
196 @echo ' rm $(config_h); ./autogen.sh'
197 @echo
198 @false
201 ################################################################
202 # testing
204 RESULT_DIR=$(top-build-dir)/out/test-results
207 test:
208 @echo -en 'For tracking crashes: use\n\n\t'
209 @echo 'grep sourcefilename `grep -L systems.texi input/regression/out-test/*log|sed s/log/ly/g`'
210 @echo
211 $(MAKE) -C input/regression/ out=test local-test
212 $(MAKE) -C input/regression/musicxml out=test local-test
214 test-baseline:
215 @if test -d .git ; then \
216 $(if $(shell git diff), echo "commit before base lining" && false,true) ; \
218 $(MAKE)
219 $(MAKE) test
220 $(MAKE) out=test -C input/regression/ local-test-baseline
221 $(MAKE) out=test -C input/regression/musicxml local-test-baseline
223 local-check: test
224 rm -rf $(RESULT_DIR)
225 mkdir -p $(RESULT_DIR)
226 $(PYTHON) $(buildscript-dir)/output-distance.py --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/
227 @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g'
230 test-redo:
231 for a in `cat $(RESULT_DIR)/changed.txt` ; do \
232 echo removing $$a* ; \
233 rm -f $$a* ;\
234 done
235 $(MAKE) check
237 test-clean:
238 $(MAKE) -C input/regression/ out=test clean