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 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 RELEASE_FILES
= ChangeLog RELEASE-COMMIT
26 RELEASE_OUT_FILES
= $(RELEASE_FILES
:%=$(outdir
)/%)
27 OUT_DIST_FILES
+= $(RELEASE_OUT_FILES
)
28 EXTRA_DIST_FILES
= VERSION .gitignore \
29 $(README_FILES
) $(SCRIPTS
) $(IN_FILES
)
30 INSTALLATION_DIR
=$(local_lilypond_datadir
)
31 INSTALLATION_FILES
=$(config_make
) VERSION
35 STEPMAKE_TEMPLATES
=toplevel po
install
36 LOCALSTEPMAKE_TEMPLATES
=lilypond
38 include $(depth
)/make
/stepmake.make
41 local-dist
: refresh-release-files dist-toplevel-txt-files
43 all: $(outdir
)/VERSION
45 $(outdir
)/VERSION
: $(config_make
) VERSION
47 echo
$(TOPLEVEL_VERSION
) > $@
49 $(outdir
)/ChangeLog
: $(outdir
)/VERSION
50 @echo
'See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/$(TOPLEVEL_VERSION)-1' > $@
52 $(outdir
)/RELEASE-COMMIT
: # FIXME: any file in $(top-src-dir)/.git/ we can depend on and be sure RELEASE-COMMIT is up to date?
53 git
--git-dir
=$(top-src-dir
)/.git show HEAD | head
-100 > $@
55 # junk me as soon as RELEASE-COMMIT FIXME: has been addressed
56 refresh-release-files
:
57 test -d
$(top-src-dir
)/.git
&& rm -f
$(RELEASE_OUT_FILES
)
58 $(MAKE
) $(RELEASE_OUT_FILES
)
63 top-doc
: python-modules
65 local-clean
: local-clean-ChangeLog
67 local-clean-ChangeLog
:
70 dist-toplevel-txt-files
: top-doc
72 ln
$(TOPDOC_TXT_FILES
) $(distdir
)/
73 ln
$(top-src-dir
)/stepmake
/aclocal.m4
$(distdir
)/
76 $(foreach d
, $(INFO_DIRECTORIES
),$(MAKE
) -C
$(d
) out
=www
info && ) true
79 $(MAKE
) out
=www COPY_INFO_IMAGES
=1 install-info-WWW
82 $(MAKE
) -C scripts man install-help2man
83 $(MAKE
) -C lily man install-help2man
86 $(MAKE
) out
=www install-WWW
87 $(MAKE
) out
=www install-info-WWW
90 $(MAKE
) out
=www uninstall-WWW
93 $(INSTALL
) -d
$(DESTDIR
)$(local_lilypond_datadir
)
99 # All web targets, except info image symlinks and info docs are
100 # installed in non-recursing target from TOP-SRC-DIR
102 -$(INSTALL
) -m
755 -d
$(DESTDIR
)$(webdir
)
103 rsync
-rl
--exclude
='*.signature' $(outdir
)/offline-root
/ $(DESTDIR
)$(webdir
)
106 $(foreach d
, $(INFO_DIRECTORIES
),$(MAKE
) -C
$(d
) install-info
&& ) true
109 rm -rf
$(DESTDIR
)$(webdir
)
110 -rmdir
$(package_docdir
)
111 $(MAKE
) -C Documentation
/user
uninstall
112 $(MAKE
) -C input
/lsr
uninstall
115 # For online docs with content negotiation, issue `make doc WEB_TARGETS=online'
116 # For both online and offline docs, issue `make doc WEB_TARGETS="offline online"'
117 WEB_TARGETS
= offline
120 # need UTF8 setting in case this is hosted on a website.
121 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
122 $(buildscript-dir
)/mutopia-index
-o
$(outdir
)/examples.html input
/
123 find
$(outdir
) -name
'*-root' | xargs
rm -rf
124 $(buildscript-dir
)/www_post
$(PACKAGE_NAME
) $(TOPLEVEL_VERSION
) $(outdir
) "$(WEB_TARGETS)"
125 find
$(outdir
)/offline-root
-type l
-delete
129 tree-prefix
= $(outdir
)
130 tree-bin
= $(tree-prefix
)/bin
131 tree-lib
= $(tree-prefix
)/lib
132 tree-share
= $(tree-prefix
)/share
134 # Don't put version numbers here. During development
135 # they make no sense, and cause EPS files to become invalid.
137 tree-share-prefix
= $(tree-share
)/lilypond
/current
138 tree-lib-prefix
= $(tree-lib
)/lilypond
/current
142 $(foreach i
, $(C_DIRS
), $(MAKE
) -C
$(i
) clean &&) true
144 src-ext
= c
cc yy ll hh icc py scm
tex ps texi itexi tely itely sh
146 doc-clean
: snippets-clean
$(tree-share-prefix
)/lilypond-force
148 default
: $(config_h
) build-dir-setup
150 build-dir-setup
: $(tree-share-prefix
)/lilypond-force
152 PO_FILES
= $(call src-wildcard
,$(src-depth
)/po
/*.po
)
153 HELP_CATALOGS
= $(PO_FILES
:po
/%.po
=%)
154 CATALOGS
= $(HELP_CATALOGS
:lilypond
=)
156 $(tree-share-prefix
)/lilypond-force link-tree
: GNUmakefile
$(outdir
)/VERSION
157 # Preparing LilyPond tree for build-dir exec
158 cd
$(top-build-dir
)/$(outbase
) && rm -rf bin lib share
160 mkdir
-p
$(tree-share-prefix
)
161 mkdir
-p
$(tree-lib-prefix
)
162 mkdir
-p
$(tree-share-prefix
)/elisp
163 mkdir
-p
$(tree-share-prefix
)/fonts
164 mkdir
-p
$(tree-share-prefix
)/fonts
/otf
165 mkdir
-p
$(tree-share-prefix
)/fonts
/tfm
166 mkdir
-p
$(tree-share-prefix
)/fonts
/type1
167 mkdir
-p
$(tree-share-prefix
)/fonts
/svg
168 mkdir
-p
$(tree-share-prefix
)/fonts
/map
169 mkdir
-p
$(tree-share-prefix
)/fonts
/enc
170 mkdir
-p
$(tree-share-prefix
)/tex
172 ln
-sf ..
/..
/lily
/$(outconfbase
)/lilypond .
&& \
173 for i in abc2ly convert-ly etf2ly lilymidi lilypond-book lilypond-invoke-editor midi2ly musicxml2ly
; \
174 do ln
-sf ..
/..
/scripts
/$(outconfbase
)/$$i .
; done
175 cd
$(tree-lib-prefix
) && \
176 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
177 cd
$(tree-share-prefix
) && \
178 ln
-s
$(top-src-dir
)/ly ly
&& \
179 ln
-s ..
/..
/..
/..
/mf mf
&& \
180 ln
-s
$(top-src-dir
)/ps
&& \
181 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
&& \
182 ln
-s
$(top-src-dir
)/scm
&& \
183 ln
-s
$(top-src-dir
)/scripts scripts
184 cd
$(tree-share-prefix
)/tex && \
185 ln
-s
$(top-src-dir
)/tex source
&& \
186 ln
-s ..
/..
/..
/..
/..
/tex/$(outconfbase
) tex-out
&& \
188 cd
$(tree-share-prefix
)/fonts
&& \
189 ln
-s
$(top-src-dir
)/mf source
&& \
191 -cd
$(tree-share-prefix
)/elisp
&& \
192 ln
-sf ..
/..
/..
/..
/..
/elisp
/$(outconfbase
)/lilypond-words.el .
&& \
193 ln
-s
$(top-src-dir
)/elisp
/*.el .
194 $(foreach i
,$(CATALOGS
), \
195 (mkdir
-p
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
196 cd
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
197 ln
-sf ..
/..
/..
/..
/..
/po
/$(outconfbase
)/$i.mo lilypond.mo
) &&) true
198 touch
$(tree-share-prefix
)/lilypond-force
200 $(tree-share-prefix
)/mf-link-tree link-mf-tree
: $(tree-share-prefix
)/lilypond-force
201 -rm -f
$(tree-share-prefix
)/fonts
/otf
/* && \
202 rm -f
$(tree-share-prefix
)/fonts
/svg
/* && \
203 rm -f
$(tree-share-prefix
)/fonts
/fonts.conf
&& \
204 rm -f
$(tree-share-prefix
)/fonts
/tfm
/* && \
205 rm -f
$(tree-share-prefix
)/fonts
/type1
/* && \
206 cd
$(tree-share-prefix
)/fonts
/otf
&& \
207 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.otf .
208 -cd
$(tree-share-prefix
)/fonts
/ && \
209 ln
-s ..
/..
/..
/..
/..
/mf
/$(outconfbase
)/fonts.conf .
210 -cd
$(tree-share-prefix
)/fonts
/svg
&& \
211 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.svg .
212 -cd
$(tree-share-prefix
)/fonts
/tfm
&& \
213 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.tfm .
214 -cd
$(tree-share-prefix
)/fonts
/type1
&& \
215 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.pf? .
218 etags
-o
$@
$(find
$(top-src-dir
) -name
'GNUmakefile*' -o
-name
'*.make')
220 $(config_h
): config.hh.in
222 # this is to prevent people from getting
223 # undefined symbols when we add them to config.h.in,
224 # and they blindly run "cvs update; make".
227 @echo
' *** $(config_h) is out of date'
228 @echo
' *** Remove it and rerun autogen:'
229 @echo
' rm $(config_h); ./autogen.sh'
234 $(MAKE
) -C scripts
/build
235 PATH
=$(buildscript-dir
):$(PATH
) $(buildscript-dir
)/grand-replace
237 ################################################################
240 RESULT_DIR
=$(top-build-dir
)/out
/test-results
244 @echo
-en
'For tracking crashes: use\n\n\t'
245 @echo
'grep sourcefilename `grep -L systems.texi out/lybook-db/*/*log|sed s/log/ly/g`'
247 $(MAKE
) -C input
/regression
/ out
=test local-test
248 $(MAKE
) -C input
/regression
/musicxml out
=test local-test
251 @if
test -d .git
; then \
252 $(if
$(shell git diff
), echo
"commit before base lining" && false
,true
) ; \
256 $(MAKE
) out
=test -C input
/regression
/ local-test-baseline
257 $(MAKE
) out
=test -C input
/regression
/musicxml local-test-baseline
258 $(MAKE
) test-snippets-clean
263 mkdir
-p
$(RESULT_DIR
)
264 $(buildscript-dir
)/output-distance
--create-images
--output-dir
$(RESULT_DIR
) input
/regression
/out-test-baseline input
/regression
/out-test
/
265 @find input ly
-name
'*.ly' -print |grep
-v
'out.*/' | xargs grep
'\\version' -L | grep
-v
"standard input" |sed
's/^/**** Missing version: /g'
269 for a in
`cat $(RESULT_DIR)/changed.txt` ; do \
270 echo removing
$$a* ; \
275 test-clean
: test-snippets-clean
276 $(MAKE
) -C input
/regression
/ out
=test clean
282 rm -rf out
/lybook-testdb