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