]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
Add skeleton markers to French .itelys
[lilypond.git] / GNUmakefile.in
1 # -*-Makefile-*-
2
3 depth = .
4
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)
13
14
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)
18
19 SCRIPTS = configure autogen.sh 
20 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
21 TOPDOC_FILES=AUTHORS README INSTALL NEWS
22 TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES)))
23 IN_FILES := $(call src-wildcard,*.in)
24
25 EXTRA_DIST_FILES = VERSION .cvsignore .gitignore SConstruct \
26   $(README_FILES) $(SCRIPTS) $(IN_FILES) 
27 INSTALLATION_DIR=$(local_lilypond_datadir)
28 INSTALLATION_FILES=$(config_make) VERSION
29
30 # bootstrap stepmake:
31 #
32 STEPMAKE_TEMPLATES=toplevel po install
33 include $(depth)/make/stepmake.make
34
35 #
36 # suggested settings
37 #
38 # CHECK_SOURCE=<input/regression/ reference dir>
39 # LILYPOND_JOBS= -djob-count=X   ## for SMP/Multicore machine
40
41 include local.make
42
43 local-dist: dist-toplevel-txt-files 
44
45 default: $(outdir)/VERSION
46
47 $(outdir)/VERSION: $(config_make) VERSION
48         echo $(TOPLEVEL_VERSION) > $@
49
50 dist-toplevel-txt-files:
51         -mkdir -p $(distdir)
52         ln $(TOPDOC_TXT_FILES) $(distdir)/
53         ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
54
55 doc: 
56         $(MAKE) -C Documentation
57
58 install-WWW:
59         -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
60         rsync -rl $(outdir)/offline-root/ $(DESTDIR)$(webdir)
61         $(MAKE) -C Documentation/user local-install-WWW
62         $(MAKE) -C Documentation/user install-info
63
64 install-help2man:
65         $(MAKE) -C scripts man install-help2man
66         $(MAKE) -C lily man install-help2man
67
68 web-install:
69         $(MAKE) out=www install-WWW
70
71 uninstall-WWW:
72         echo TODO
73
74 web-uninstall:
75         $(MAKE) out=www uninstall-WWW
76
77 local-install:
78         $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
79
80 final-install:
81         @true
82
83
84 # For online docs with content negotiation, issue `make web WEB_TARGETS=online'
85 # For both online and offline docs, issue `make web WEB_TARGETS="offline online"'
86 WEB_TARGETS = offline
87
88 local-WWW-post:
89 # need UTF8 setting in case this is hosted on a website. 
90         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
91         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/
92         rm -rf $(outdir)/online-root
93         rm -rf $(outdir)/offline-root
94         $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(outdir) "$(WEB_TARGETS)"
95
96 tree-prefix = $(outdir)
97 tree-bin = $(tree-prefix)/bin
98 tree-lib = $(tree-prefix)/lib
99 tree-share = $(tree-prefix)/share
100 tree-share-prefix = $(tree-share)/lilypond/$(TOPLEVEL_VERSION)
101 tree-share-prefix-current = $(tree-share)/lilypond/current
102 tree-lib-prefix = $(tree-lib)/lilypond/$(TOPLEVEL_VERSION)
103 tree-lib-prefix-current = $(tree-lib)/lilypond/current
104
105 C_DIRS = flower lily
106 c-clean:
107         $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
108
109 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
110
111 web-clean:
112         $(MAKE) out=www clean
113         $(MAKE) $(tree-share-prefix)/lilypond-force
114
115 default: $(config_h) build-dir-setup 
116
117 build-dir-setup: $(tree-share-prefix)/lilypond-force
118
119 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
120 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
121 CATALOGS = $(HELP_CATALOGS:lilypond=) 
122
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         ln -s $(TOPLEVEL_VERSION) $(tree-share-prefix-current)
129         mkdir -p $(tree-lib-prefix)
130         ln -s $(TOPLEVEL_VERSION) $(tree-lib-prefix-current)
131         mkdir -p $(tree-share-prefix)/dvips
132         mkdir -p $(tree-share-prefix)/elisp
133         mkdir -p $(tree-share-prefix)/fonts
134         mkdir -p $(tree-share-prefix)/fonts/otf
135         mkdir -p $(tree-share-prefix)/fonts/tfm
136         mkdir -p $(tree-share-prefix)/fonts/type1
137         mkdir -p $(tree-share-prefix)/fonts/svg
138         mkdir -p $(tree-share-prefix)/fonts/map
139         mkdir -p $(tree-share-prefix)/fonts/enc
140         mkdir -p $(tree-share-prefix)/tex
141         cd $(tree-bin) && \
142                 ln -sf ../../lily/$(outconfbase)/lilypond . && \
143                 for i in abc2ly convert-ly etf2ly lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
144                         do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
145         cd $(tree-lib-prefix) && \
146                 ln -s ../../../../python/$(outconfbase) python
147         cd $(tree-share-prefix) && \
148                 ln -s $(top-src-dir)/ly ly && \
149                 ln -s ../../../../mf mf && \
150                 ln -s $(top-src-dir)/ps && \
151                 ln -s ../../../../python/$(outconfbase) python && \
152                 ln -s $(top-src-dir)/scm && \
153                 ln -s $(top-src-dir)/scripts scripts
154         cd $(tree-share-prefix)/dvips && \
155                 ln -s ./../../../mf/$(outconfbase) mf-out && \
156                 ln -s $(top-src-dir)/ps
157         cd $(tree-share-prefix)/tex && \
158                 ln -s $(top-src-dir)/tex source && \
159                 ln -s ../../../../../tex/$(outconfbase) tex-out && \
160                 ln -s ../../../../../mf/$(outconfbase) mf-out
161
162         cd $(tree-share-prefix)/fonts && \
163                 ln -s $(top-src-dir)/mf source && \
164                 true
165         -cd $(tree-share-prefix)/elisp && \
166                 ln -sf ../../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
167                 ln -s $(top-src-dir)/elisp/*.el .
168         $(foreach i,$(CATALOGS), \
169                 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
170                 cd $(tree-share)/locale/$i/LC_MESSAGES && \
171                 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
172         touch $(tree-share-prefix)/lilypond-force
173
174 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
175         -rm -f $(tree-share-prefix)/fonts/otf/* &&  \
176         rm -f $(tree-share-prefix)/fonts/svg/* &&  \
177         rm -f $(tree-share-prefix)/fonts/tfm/* &&  \
178         rm -f $(tree-share-prefix)/fonts/type1/* &&  \
179                 cd $(tree-share-prefix)/fonts/otf && \
180                 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
181         -cd $(tree-share-prefix)/fonts/svg && \
182                 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
183         -cd $(tree-share-prefix)/fonts/tfm && \
184                 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
185         -cd $(tree-share-prefix)/fonts/type1 && \
186                 ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
187
188 TAGS.make: dummy
189         etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
190
191 $(config_h): config.hh.in
192 #
193 # this is to prevent people from getting
194 # undefined symbols  when we add them to config.h.in,
195 # and they blindly run "cvs update; make".
196 #
197         @echo
198         @echo ' *** $(config_h) is out of date'
199         @echo ' *** Remove it and rerun autogen:'
200         @echo '         rm $(config_h); ./autogen.sh'
201         @echo
202         @false
203
204
205 ################################################################
206 # testing
207
208 RESULT_DIR=$(top-build-dir)/out/test-results
209 OUT_TEST=test
210
211
212 test:
213         rm -f input/regression/out-$(OUT_TEST)/collated-files.html
214         @echo -en 'For tracking crashes: use\n\n\t'
215         @echo 'grep sourcefilename `grep -L systems.texi input/regression/out-test/*log|sed s/log/ly/g`'
216         @echo
217         if test -d .git  ; then \
218                 echo -e 'HEAD is:\n\n\t' ; \
219                 git log --max-count=1 --pretty=oneline ;\
220                 echo -e '\n\n\n' ; \
221                 git diff ; \
222         fi > input/regression/out-test/tree.gittxt
223         $(MAKE) -C input/regression/ out=$(OUT_TEST) LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-$(OUT_TEST)/collated-files.html
224         @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' 
225
226
227 test-baseline: test
228         rm -rf input/regression/out-test-baseline
229         mv input/regression/out-test input/regression/out-test-baseline
230
231 local-check: test
232         rm -rf $(RESULT_DIR)
233         mkdir -p $(RESULT_DIR)
234         $(PYTHON) $(buildscript-dir)/output-distance.py --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/
235
236
237 test-redo:
238         for a in `cat $(RESULT_DIR)/changed.txt` ; do \
239                 echo removing $$a* ; \
240                 rm -f $$a* ;\
241         done
242         $(MAKE) check
243
244 test-clean:
245         $(MAKE) -C input/regression/ out=$(OUT_TEST) clean