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 COPYING.FDL DEDICATION ROADMAP THANKS HACKING \
21 LICENSE LICENSE.DOCUMENTATION
22 TOPDOC_FILES
= AUTHORS INSTALL README NEWS
23 TOPDOC_TXT_FILES
= $(addprefix $(top-build-dir
)/Documentation
/topdocs
/$(outdir
)/,$(addsuffix .txt
,$(TOPDOC_FILES
)))
24 IN_FILES
:= $(call src-wildcard
,*.in
)
26 RELEASE_FILES
= ChangeLog RELEASE-COMMIT
27 RELEASE_OUT_FILES
= $(RELEASE_FILES
:%=$(outdir
)/%)
28 OUT_DIST_FILES
+= $(RELEASE_OUT_FILES
)
29 EXTRA_DIST_FILES
= VERSION .gitignore .mailmap \
30 $(README_FILES
) $(SCRIPTS
) $(IN_FILES
)
31 INSTALLATION_DIR
=$(local_lilypond_datadir
)
32 INSTALLATION_FILES
=$(config_make
) VERSION
36 STEPMAKE_TEMPLATES
=toplevel po
install
37 LOCALSTEPMAKE_TEMPLATES
=lilypond
39 include $(depth
)/make
/stepmake.make
42 local-dist
: refresh-release-files dist-toplevel-txt-files
44 all: $(outdir
)/VERSION
46 $(outdir
)/VERSION
: $(config_make
) VERSION
48 echo
$(TOPLEVEL_VERSION
) > $@
50 $(outdir
)/ChangeLog
: $(outdir
)/VERSION
51 @echo
'See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/$(TOPLEVEL_VERSION)-1' > $@
53 $(outdir
)/RELEASE-COMMIT
: # FIXME: any file in $(top-src-dir)/.git/ we can depend on and be sure RELEASE-COMMIT is up to date?
54 git
--git-dir
=$(top-src-dir
)/.git show HEAD | head
-100 > $@
56 # junk me as soon as RELEASE-COMMIT FIXME: has been addressed
57 refresh-release-files
:
58 test -d
$(top-src-dir
)/.git
&& rm -f
$(RELEASE_OUT_FILES
)
59 $(MAKE
) $(RELEASE_OUT_FILES
)
64 top-doc
: python-modules
66 local-clean
: local-clean-ChangeLog
68 local-clean-ChangeLog
:
71 dist-toplevel-txt-files
: top-doc
73 ln
$(TOPDOC_TXT_FILES
) $(distdir
)/
74 ln
$(top-src-dir
)/stepmake
/aclocal.m4
$(distdir
)/
77 $(foreach d
, $(INFO_DIRECTORIES
),$(MAKE
) -C
$(d
) out
=www
info && ) true
80 $(MAKE
) out
=www COPY_INFO_IMAGES
=1 install-info-WWW
83 $(MAKE
) -C scripts man install-help2man
84 $(MAKE
) -C lily man install-help2man
87 $(MAKE
) out
=www install-WWW
88 $(MAKE
) out
=www install-info-WWW
91 $(MAKE
) out
=www uninstall-WWW
94 $(INSTALL
) -d
$(DESTDIR
)$(local_lilypond_datadir
)
100 # All web targets, except info image symlinks and info docs are
101 # installed in non-recursing target from TOP-SRC-DIR
103 -$(INSTALL
) -m
755 -d
$(DESTDIR
)$(webdir
)
104 rsync
-rl
--exclude
='*.signature' $(outdir
)/offline-root
/ $(DESTDIR
)$(webdir
)
105 $(MAKE
) -C Documentation omf-local-install
108 $(foreach d
, $(INFO_DIRECTORIES
),$(MAKE
) -C
$(d
) install-info
&& ) true
111 rm -rf
$(DESTDIR
)$(webdir
)
112 -rmdir
$(package_docdir
)
113 $(MAKE
) -C Documentation
uninstall
116 # For online docs with content negotiation, issue `make doc WEB_TARGETS=online'
117 # For both online and offline docs, issue `make doc WEB_TARGETS="offline online"'
118 WEB_TARGETS
= offline
121 # need UTF8 setting in case this is hosted on a website.
122 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
123 $(buildscript-dir
)/mutopia-index
-o
$(outdir
)/examples.html input
/
124 find
$(outdir
) -name
'*-root' | xargs
rm -rf
125 $(buildscript-dir
)/www_post
$(PACKAGE_NAME
) $(TOPLEVEL_VERSION
) $(outdir
) "$(WEB_TARGETS)"
126 find
$(outdir
)/offline-root
-type l
-delete
127 endif # ifeq ($(out),www)
129 # For those who cannot for the life in them remember to type
130 # WEB_TARGETS=..., just bloody make all doc stuff, already.
132 $(MAKE
) WEB_TARGETS
='online offline' doc
134 tree-prefix
= $(outdir
)
135 tree-bin
= $(tree-prefix
)/bin
136 tree-lib
= $(tree-prefix
)/lib
137 tree-share
= $(tree-prefix
)/share
139 # Don't put version numbers here. During development
140 # they make no sense, and cause EPS files to become invalid.
142 tree-share-prefix
= $(tree-share
)/lilypond
/current
143 tree-lib-prefix
= $(tree-lib
)/lilypond
/current
147 $(foreach i
, $(C_DIRS
), $(MAKE
) -C
$(i
) clean &&) true
149 src-ext
= c
cc yy ll hh icc py scm
tex ps texi itexi tely itely sh
151 doc-clean
: snippets-clean
$(tree-share-prefix
)/lilypond-force
153 default
: $(config_h
) build-dir-setup
155 build-dir-setup
: $(tree-share-prefix
)/lilypond-force
157 PO_FILES
= $(call src-wildcard
,$(src-depth
)/po
/*.po
)
158 HELP_CATALOGS
= $(PO_FILES
:po
/%.po
=%)
159 CATALOGS
= $(HELP_CATALOGS
:lilypond
=)
161 $(tree-share-prefix
)/lilypond-force link-tree
: GNUmakefile
$(outdir
)/VERSION
162 # Preparing LilyPond tree for build-dir exec
163 cd
$(top-build-dir
)/$(outbase
) && rm -rf bin lib share
165 mkdir
-p
$(tree-share-prefix
)
166 mkdir
-p
$(tree-lib-prefix
)
167 mkdir
-p
$(tree-share-prefix
)/elisp
168 mkdir
-p
$(tree-share-prefix
)/fonts
169 mkdir
-p
$(tree-share-prefix
)/fonts
/otf
170 mkdir
-p
$(tree-share-prefix
)/fonts
/tfm
171 mkdir
-p
$(tree-share-prefix
)/fonts
/type1
172 mkdir
-p
$(tree-share-prefix
)/fonts
/svg
173 mkdir
-p
$(tree-share-prefix
)/fonts
/map
174 mkdir
-p
$(tree-share-prefix
)/fonts
/enc
175 mkdir
-p
$(tree-share-prefix
)/tex
177 ln
-sf ..
/..
/lily
/$(outconfbase
)/lilypond .
&& \
178 for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly
; \
179 do ln
-sf ..
/..
/scripts
/$(outconfbase
)/$$i .
; done
180 cd
$(tree-lib-prefix
) && \
181 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
182 cd
$(tree-share-prefix
) && \
183 ln
-s
$(top-src-dir
)/ly ly
&& \
184 ln
-s ..
/..
/..
/..
/mf mf
&& \
185 ln
-s
$(top-src-dir
)/ps
&& \
186 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
&& \
187 ln
-s
$(top-src-dir
)/scm
&& \
188 ln
-s
$(top-src-dir
)/scripts scripts
189 cd
$(tree-share-prefix
)/tex && \
190 ln
-s
$(top-src-dir
)/tex source
&& \
191 ln
-s ..
/..
/..
/..
/..
/tex/$(outconfbase
) tex-out
&& \
193 cd
$(tree-share-prefix
)/fonts
&& \
194 ln
-s
$(top-src-dir
)/mf source
&& \
196 -cd
$(tree-share-prefix
)/elisp
&& \
197 ln
-sf ..
/..
/..
/..
/..
/elisp
/$(outconfbase
)/lilypond-words.el .
&& \
198 ln
-s
$(top-src-dir
)/elisp
/*.el .
199 $(foreach i
,$(CATALOGS
), \
200 (mkdir
-p
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
201 cd
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
202 ln
-sf ..
/..
/..
/..
/..
/po
/$(outconfbase
)/$i.mo lilypond.mo
) &&) true
203 touch
$(tree-share-prefix
)/lilypond-force
205 $(tree-share-prefix
)/mf-link-tree link-mf-tree
: $(tree-share-prefix
)/lilypond-force
206 -rm -f
$(tree-share-prefix
)/fonts
/otf
/* && \
207 rm -f
$(tree-share-prefix
)/fonts
/svg
/* && \
208 rm -f
$(tree-share-prefix
)/fonts
/fonts.conf
&& \
209 rm -f
$(tree-share-prefix
)/fonts
/tfm
/* && \
210 rm -f
$(tree-share-prefix
)/fonts
/type1
/* && \
211 cd
$(tree-share-prefix
)/fonts
/otf
&& \
212 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.otf .
213 -cd
$(tree-share-prefix
)/fonts
/ && \
214 ln
-s ..
/..
/..
/..
/..
/mf
/$(outconfbase
)/fonts.conf .
215 -cd
$(tree-share-prefix
)/fonts
/svg
&& \
216 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.svg .
217 -cd
$(tree-share-prefix
)/fonts
/tfm
&& \
218 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.tfm .
219 -cd
$(tree-share-prefix
)/fonts
/type1
&& \
220 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.pf? .
223 etags
-o
$@
$(find
$(top-src-dir
) -name
'GNUmakefile*' -o
-name
'*.make')
225 $(config_h
): config.hh.in
227 # this is to prevent people from getting
228 # undefined symbols when we add them to config.h.in,
229 # and they blindly run "cvs update; make".
232 @echo
' *** $(config_h) is out of date'
233 @echo
' *** Remove it and rerun autogen:'
234 @echo
' rm $(config_h); ./autogen.sh'
239 $(MAKE
) -C scripts
/build
240 PATH
=$(buildscript-dir
):$(PATH
) $(buildscript-dir
)/grand-replace
243 ################################################################
244 # website (without the rest of the docs)
246 touch Documentation
/web.texi
247 cd Documentation
&& make out
=www out-www
/web
/index.html
250 ################################################################
253 RESULT_DIR
=$(top-build-dir
)/out
/test-results
257 @echo
-en
'For tracking crashes: use\n\n\t'
258 @echo
'grep sourcefilename `grep -L systems.texi out/lybook-db/*/*log|sed s/log/ly/g`'
260 $(MAKE
) -C input
/regression
/ out
=test local-test
261 $(MAKE
) -C input
/regression
/musicxml out
=test local-test
262 $(MAKE
) -C input
/regression
/abc2ly out
=test local-test
265 @if
test -d .git
; then \
266 $(if
$(shell git diff
), echo
"commit before base lining" && false
,true
) ; \
270 $(MAKE
) out
=test -C input
/regression
/ local-test-baseline
271 $(MAKE
) out
=test -C input
/regression
/musicxml local-test-baseline
272 $(MAKE
) out
=test -C input
/regression
/abc2ly local-test-baseline
273 $(MAKE
) test-snippets-clean
278 mkdir
-p
$(RESULT_DIR
)
279 $(buildscript-dir
)/output-distance
--create-images
--output-dir
$(RESULT_DIR
) input
/regression
/out-test-baseline input
/regression
/out-test
/
280 @find input ly
-name
'*.ly' -print |grep
-v
'out.*/' | xargs grep
'\\version' -L | grep
-v
"standard input" |sed
's/^/**** Missing version: /g'
284 for a in
`cat $(RESULT_DIR)/changed.txt` ; do \
285 echo removing
$$a* ; \
290 test-clean
: test-snippets-clean
291 $(MAKE
) -C input
/regression
/ out
=test clean
297 rm -rf out
/lybook-testdb