5 SUBDIRS
= buildscripts python scripts \
12 cygwin 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 aclocal.m4 autogen.sh lexer-gcc-3.1.sh Doxyfile
20 README_FILES
= ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
21 README_TXT_FILES
= AUTHORS.txt README.txt INSTALL.txt NEWS.txt
22 IN_FILES
:= $(call src-wildcard
,*.in
)
23 PATCH_FILES
= emacsclient.patch server.el.patch darwin.patch
24 EXTRA_DIST_FILES
= VERSION .cvsignore SConstruct \
25 $(README_FILES
) $(SCRIPTS
) $(IN_FILES
) $(PATCH_FILES
)
26 NON_ESSENTIAL_DIST_FILES
= $(README_TXT_FILES
)
27 INSTALLATION_DIR
=$(local_lilypond_datadir
)
28 INSTALLATION_FILES
=$(config_make
) VERSION
32 STEPMAKE_TEMPLATES
=toplevel po
install
33 include $(depth
)/make
/stepmake.make
36 $(MAKE
) -C Documentation
39 -$(INSTALL
) -m
755 -d
$(DESTDIR
)$(webdir
)
40 cp
-a
$(outdir
)/web-root
/ $(DESTDIR
)$(webdir
)/
42 $(MAKE
) -C Documentation
/user local-install-WWW
43 $(MAKE
) -C Documentation
/user install-info
46 $(MAKE
) out
=www install-WWW
52 $(MAKE
) out
=www uninstall-WWW
=
55 $(INSTALL
) -d
$(DESTDIR
)$(local_lilypond_datadir
)
60 web-ext
= html midi pdf png txt ly
62 footify
= $(PYTHON
) $(step-bindir
)/add-html-footer.py
--name
$(PACKAGE_NAME
) --version
$(TOPLEVEL_VERSION
)
63 footifymail
= MAILADDRESS
=bug-lilypond@gnu.org
66 # need UTF8 setting in case this is hosted on a website.
67 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
68 $(PYTHON
) $(buildscript-dir
)/mutopia-index.py
-o
$(outdir
)/examples.html input
/
69 echo
'<META HTTP-EQUIV="refresh" content="0;URL=Documentation/index.html">' > $(outdir
)/index.html
70 echo
'<html><body>Redirecting to the documentation index...</body></html>' >> $(outdir
)/index.html
72 cd
$(top-build-dir
) && $(FIND
) .
-name
'*.html' -print |
$(footifymail
) xargs
$(footify
)
73 cd
$(top-build-dir
) && find .
-name \
*.html~
-print | xargs
rm -f
74 cd
$(top-build-dir
) && find Documentation input \
75 $(web-ext
:%=-path
'*/out-www/*.%' -or
) -type l \
77 ls
$(outdir
)/*.html
>> $(outdir
)/weblist
79 ## rewrite file names so we lose out-www
80 rm -rf
$(outdir
)/web-root
/
81 mkdir
$(outdir
)/web-root
/
82 cat
$(outdir
)/weblist |
(cd
$(top-build-dir
); tar -cf-
-T-
) | \
83 tar -C
$(outdir
)/web-root
/ -xf
-
84 cd
$(outdir
)/web-root
/ && \
85 for a in
`find . -name out-www`; do \
90 tree-prefix
= $(outdir
)
91 tree-bin
= $(tree-prefix
)/bin
92 tree-lib
= $(tree-prefix
)/lib
93 tree-share
= $(tree-prefix
)/share
94 tree-share-prefix
= $(tree-share
)/lilypond
/$(TOPLEVEL_VERSION
)
95 tree-lib-prefix
= $(tree-lib
)/lilypond
/$(TOPLEVEL_VERSION
)
97 src-ext
= c
cc yy ll hh icc py scm
tex ps texi itexi tely itely sh
100 $(MAKE
) out
=www
clean
101 $(MAKE
) $(tree-share-prefix
)/lilypond-force
103 default
: $(config_h
) build-dir-setup
105 build-dir-setup
: $(tree-share-prefix
)/lilypond-force
107 PO_FILES
= $(call src-wildcard
,$(src-depth
)/po
/*.po
)
108 HELP_CATALOGS
= $(PO_FILES
:$(src-depth
)/po
/%.po
=%)
109 CATALOGS
= $(HELP_CATALOGS
:lilypond
=)
111 $(tree-share-prefix
)/lilypond-force link-tree
: GNUmakefile
112 # Preparing LilyPond tree for build-dir exec
113 cd
$(top-build-dir
)/$(outbase
) && rm -rf bin lib share
115 mkdir
-p
$(tree-share-prefix
)
116 mkdir
-p
$(tree-lib-prefix
)
117 (cd
$(tree-lib
)/lilypond
/ && ln
-sf
$(TOPLEVEL_VERSION
) current
)
118 (cd
$(tree-share
)/lilypond
/ && ln
-sf
$(TOPLEVEL_VERSION
) current
)
119 mkdir
-p
$(tree-share-prefix
)/dvips
120 mkdir
-p
$(tree-share-prefix
)/elisp
121 mkdir
-p
$(tree-share-prefix
)/fonts
122 mkdir
-p
$(tree-share-prefix
)/fonts
/otf
123 mkdir
-p
$(tree-share-prefix
)/fonts
/tfm
124 mkdir
-p
$(tree-share-prefix
)/fonts
/type1
125 mkdir
-p
$(tree-share-prefix
)/fonts
/svg
126 mkdir
-p
$(tree-share-prefix
)/fonts
/map
127 mkdir
-p
$(tree-share-prefix
)/fonts
/enc
128 mkdir
-p
$(tree-share-prefix
)/tex
130 ln
-sf ..
/..
/lily
/$(outconfbase
)/lilypond .
&& \
131 ln
-sf ..
/..
/scripts
/$(outconfbase
)/convert-ly .
&& \
132 ln
-sf ..
/..
/scripts
/$(outconfbase
)/lilypond-book .
&& \
133 ln
-sf ..
/..
/scripts
/$(outconfbase
)/*.ly .
134 cd
$(tree-lib-prefix
) && \
135 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
136 cd
$(tree-share-prefix
) && \
137 ln
-s
$(top-src-dir
)/ly ly
&& \
138 ln
-s ..
/..
/..
/..
/mf mf
&& \
139 ln
-s
$(top-src-dir
)/ps
&& \
140 ln
-s ..
/..
/..
/..
/python
/$(outconfbase
) python
&& \
141 ln
-s
$(top-src-dir
)/scm
&& \
142 ln
-s
$(top-src-dir
)/scripts scripts
143 cd
$(tree-share-prefix
)/dvips
&& \
144 ln
-s .
/..
/..
/..
/mf
/$(outconfbase
) mf-out
&& \
145 ln
-s
$(top-src-dir
)/ps
146 cd
$(tree-share-prefix
)/tex && \
147 ln
-s
$(top-src-dir
)/tex source
&& \
148 ln
-s ..
/..
/..
/..
/..
/tex/$(outconfbase
) tex-out
&& \
149 ln
-s ..
/..
/..
/..
/..
/mf
/$(outconfbase
) mf-out
151 cd
$(tree-share-prefix
)/fonts
&& \
152 ln
-s
$(top-src-dir
)/mf source
&& \
154 -cd
$(tree-share-prefix
)/elisp
&& \
155 ln
-sf ..
/..
/..
/..
/..
/..
/elisp
/$(outconfbase
)/lilypond-words.el .
&& \
156 ln
-s
$(top-src-dir
)/elisp
/*.el .
157 $(foreach i
,$(CATALOGS
), \
158 (mkdir
-p
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
159 cd
$(tree-share
)/locale
/$i/LC_MESSAGES
&& \
160 ln
-sf ..
/..
/..
/..
/..
/po
/$(outconfbase
)/$i.mo lilypond.mo
) &&) true
161 touch
$(tree-share-prefix
)/lilypond-force
163 $(tree-share-prefix
)/mf-link-tree link-mf-tree
:
164 -rm -f
$(tree-share-prefix
)/fonts
/{otf
,svg
,tfm
,type1
}/* && \
165 cd
$(tree-share-prefix
)/fonts
/otf
&& \
166 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.otf .
167 -cd
$(tree-share-prefix
)/fonts
/svg
&& \
168 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.svg .
169 -cd
$(tree-share-prefix
)/fonts
/tfm
&& \
170 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.tfm .
171 -cd
$(tree-share-prefix
)/fonts
/type1
&& \
172 ln
-s ..
/..
/..
/..
/..
/..
/mf
/$(outconfbase
)/*.pfa .
175 local-clean
: build-dir-setup-clean
176 build-dir-setup-clean
:
177 cd
$(top-build-dir
) && rm -rf share
179 $(config_h
): config.hh.in
181 # this is to prevent people from getting
182 # undefined symbols when we add them to config.h.in,
183 # and they blindly run "cvs update; make".
186 @echo
' *** $(config_h) is out of date'
187 @echo
' *** Remove it and rerun autogen:'
188 @echo
' rm $(config_h); ./autogen.sh'