5 SUBDIRS = buildscripts 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
20 README_FILES = 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)
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
32 STEPMAKE_TEMPLATES=toplevel po install
33 include $(depth)/make/stepmake.make
35 local-dist: dist-toplevel-txt-files dist-changelog
38 if test -d $(top-src-dir)/.git ; then \
39 cd $(top-src-dir) && git-whatchanged gub-2.9.29-2.. > $(distdir)/ChangeLog ; \
41 cp $(top-src-dir)/ChangeLog $(distdir) ; \
44 all: $(outdir)/VERSION
46 $(outdir)/VERSION: $(config_make) VERSION
48 echo $(TOPLEVEL_VERSION) > $@
50 dist-toplevel-txt-files:
52 ln $(TOPDOC_TXT_FILES) $(distdir)/
53 ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
56 $(MAKE) -C Documentation
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
65 $(MAKE) -C scripts man install-help2man
66 $(MAKE) -C lily man install-help2man
69 $(MAKE) out=www install-WWW
75 $(MAKE) out=www uninstall-WWW
78 $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
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"'
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)"
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
107 $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
109 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
112 $(MAKE) out=www clean
113 $(MAKE) $(tree-share-prefix)/lilypond-force
115 default: $(config_h) build-dir-setup
117 build-dir-setup: $(tree-share-prefix)/lilypond-force
119 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
120 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
121 CATALOGS = $(HELP_CATALOGS:lilypond=)
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
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)/elisp
132 mkdir -p $(tree-share-prefix)/fonts
133 mkdir -p $(tree-share-prefix)/fonts/otf
134 mkdir -p $(tree-share-prefix)/fonts/tfm
135 mkdir -p $(tree-share-prefix)/fonts/type1
136 mkdir -p $(tree-share-prefix)/fonts/svg
137 mkdir -p $(tree-share-prefix)/fonts/map
138 mkdir -p $(tree-share-prefix)/fonts/enc
139 mkdir -p $(tree-share-prefix)/tex
141 ln -sf ../../lily/$(outconfbase)/lilypond . && \
142 for i in abc2ly convert-ly etf2ly lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
143 do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
144 cd $(tree-lib-prefix) && \
145 ln -s ../../../../python/$(outconfbase) python
146 cd $(tree-share-prefix) && \
147 ln -s $(top-src-dir)/ly ly && \
148 ln -s ../../../../mf mf && \
149 ln -s $(top-src-dir)/ps && \
150 ln -s ../../../../python/$(outconfbase) python && \
151 ln -s $(top-src-dir)/scm && \
152 ln -s $(top-src-dir)/scripts scripts
153 cd $(tree-share-prefix)/tex && \
154 ln -s $(top-src-dir)/tex source && \
155 ln -s ../../../../../tex/$(outconfbase) tex-out && \
156 ln -s ../../../../../mf/$(outconfbase) mf-out
158 cd $(tree-share-prefix)/fonts && \
159 ln -s $(top-src-dir)/mf source && \
161 -cd $(tree-share-prefix)/elisp && \
162 ln -sf ../../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
163 ln -s $(top-src-dir)/elisp/*.el .
164 $(foreach i,$(CATALOGS), \
165 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
166 cd $(tree-share)/locale/$i/LC_MESSAGES && \
167 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
168 touch $(tree-share-prefix)/lilypond-force
170 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
171 -rm -f $(tree-share-prefix)/fonts/otf/* && \
172 rm -f $(tree-share-prefix)/fonts/svg/* && \
173 rm -f $(tree-share-prefix)/fonts/tfm/* && \
174 rm -f $(tree-share-prefix)/fonts/type1/* && \
175 cd $(tree-share-prefix)/fonts/otf && \
176 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
177 -cd $(tree-share-prefix)/fonts/svg && \
178 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
179 -cd $(tree-share-prefix)/fonts/tfm && \
180 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
181 -cd $(tree-share-prefix)/fonts/type1 && \
182 ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
185 etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
187 $(config_h): config.hh.in
189 # this is to prevent people from getting
190 # undefined symbols when we add them to config.h.in,
191 # and they blindly run "cvs update; make".
194 @echo ' *** $(config_h) is out of date'
195 @echo ' *** Remove it and rerun autogen:'
196 @echo ' rm $(config_h); ./autogen.sh'
202 $(MAKE) -C input/regression/ out=test clean
203 $(MAKE) -C input/regression/ out=test WWW ANTI_ALIAS_FACTOR=1
206 CHECK_SOURCE=$(HOME)/vc/gub/target/linux-x86/build/lilypond-master-git.sv.gnu.org-lilypond.git/input/regression/out-test/
207 RESULT_DIR=$(top-build-dir)/out/test-results/
210 mkdir -p $(RESULT_DIR)
211 $(PYTHON) $(buildscript-dir)/output-distance.py --output-dir $(RESULT_DIR) $(CHECK_SOURCE) input/regression/out-test/