]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
output-distance: no-compare-images
[lilypond.git] / GNUmakefile.in
1 # -*-Makefile-*-
2
3 depth = .
4
5 SUBDIRS = buildscripts 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 
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)
24
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
29
30 # bootstrap stepmake:
31 #
32 STEPMAKE_TEMPLATES=toplevel po install
33 include $(depth)/make/stepmake.make
34
35 #
36 # Set
37 # CHECK_SOURCE=
38 -include local.make
39
40 local-dist: dist-toplevel-txt-files dist-changelog
41
42 dist-changelog:
43         if  test -d $(top-src-dir)/.git ; then \
44                 cd $(top-src-dir) && git-whatchanged gub-2.9.29-2.. > $(distdir)/ChangeLog ; \
45         else \
46                 cp $(top-src-dir)/ChangeLog $(distdir) ; \
47         fi
48
49 all: $(outdir)/VERSION
50
51 $(outdir)/VERSION: $(config_make) VERSION
52         -mkdir -p $(outdir)
53         echo $(TOPLEVEL_VERSION) > $@
54
55 dist-toplevel-txt-files:
56         -mkdir -p $(distdir)
57         ln $(TOPDOC_TXT_FILES) $(distdir)/
58         ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/
59
60 doc: 
61         $(MAKE) -C Documentation
62
63 install-WWW:
64         -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
65         rsync -rl $(outdir)/offline-root/ $(DESTDIR)$(webdir)
66         $(MAKE) -C Documentation/user local-install-WWW
67         $(MAKE) -C Documentation/user install-info
68
69 install-help2man:
70         $(MAKE) -C scripts man install-help2man
71         $(MAKE) -C lily man install-help2man
72
73 web-install:
74         $(MAKE) out=www install-WWW
75
76 uninstall-WWW:
77         echo TODO
78
79 web-uninstall:
80         $(MAKE) out=www uninstall-WWW
81
82 local-install:
83         $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
84
85 final-install:
86         @true
87
88
89 # For online docs with content negotiation, issue `make web WEB_TARGETS=online'
90 # For both online and offline docs, issue `make web WEB_TARGETS="offline online"'
91 WEB_TARGETS = offline
92
93 local-WWW-post:
94 # need UTF8 setting in case this is hosted on a website. 
95         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
96         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/
97         rm -rf $(outdir)/online-root
98         rm -rf $(outdir)/offline-root
99         $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(outdir) "$(WEB_TARGETS)"
100
101 tree-prefix = $(outdir)
102 tree-bin = $(tree-prefix)/bin
103 tree-lib = $(tree-prefix)/lib
104 tree-share = $(tree-prefix)/share
105 tree-share-prefix = $(tree-share)/lilypond/$(TOPLEVEL_VERSION)
106 tree-share-prefix-current = $(tree-share)/lilypond/current
107 tree-lib-prefix = $(tree-lib)/lilypond/$(TOPLEVEL_VERSION)
108 tree-lib-prefix-current = $(tree-lib)/lilypond/current
109
110 C_DIRS = flower lily
111 c-clean:
112         $(foreach i, $(C_DIRS), $(MAKE) -C $(i) clean &&) true
113
114 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
115
116 web-clean:
117         $(MAKE) out=www clean
118         $(MAKE) $(tree-share-prefix)/lilypond-force
119
120 default: $(config_h) build-dir-setup 
121
122 build-dir-setup: $(tree-share-prefix)/lilypond-force
123
124 PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
125 HELP_CATALOGS = $(PO_FILES:po/%.po=%)
126 CATALOGS = $(HELP_CATALOGS:lilypond=) 
127
128 $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION 
129 # Preparing LilyPond tree for build-dir exec
130         cd $(top-build-dir)/$(outbase) && rm -rf bin lib share
131         mkdir -p $(tree-bin)
132         mkdir -p $(tree-share-prefix)
133         ln -s $(TOPLEVEL_VERSION) $(tree-share-prefix-current)
134         mkdir -p $(tree-lib-prefix)
135         ln -s $(TOPLEVEL_VERSION) $(tree-lib-prefix-current)
136         mkdir -p $(tree-share-prefix)/elisp
137         mkdir -p $(tree-share-prefix)/fonts
138         mkdir -p $(tree-share-prefix)/fonts/otf
139         mkdir -p $(tree-share-prefix)/fonts/tfm
140         mkdir -p $(tree-share-prefix)/fonts/type1
141         mkdir -p $(tree-share-prefix)/fonts/svg
142         mkdir -p $(tree-share-prefix)/fonts/map
143         mkdir -p $(tree-share-prefix)/fonts/enc
144         mkdir -p $(tree-share-prefix)/tex
145         cd $(tree-bin) && \
146                 ln -sf ../../lily/$(outconfbase)/lilypond . && \
147                 for i in abc2ly convert-ly etf2ly lilypond-book lilypond-invoke-editor midi2ly musicxml2ly; \
148                         do ln -sf ../../scripts/$(outconfbase)/$$i . ; done
149         cd $(tree-lib-prefix) && \
150                 ln -s ../../../../python/$(outconfbase) python
151         cd $(tree-share-prefix) && \
152                 ln -s $(top-src-dir)/ly ly && \
153                 ln -s ../../../../mf mf && \
154                 ln -s $(top-src-dir)/ps && \
155                 ln -s ../../../../python/$(outconfbase) python && \
156                 ln -s $(top-src-dir)/scm && \
157                 ln -s $(top-src-dir)/scripts scripts
158         cd $(tree-share-prefix)/tex && \
159                 ln -s $(top-src-dir)/tex source && \
160                 ln -s ../../../../../tex/$(outconfbase) tex-out && \
161                 ln -s ../../../../../mf/$(outconfbase) mf-out
162
163         cd $(tree-share-prefix)/fonts && \
164                 ln -s $(top-src-dir)/mf source && \
165                 true
166         -cd $(tree-share-prefix)/elisp && \
167                 ln -sf ../../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
168                 ln -s $(top-src-dir)/elisp/*.el .
169         $(foreach i,$(CATALOGS), \
170                 (mkdir -p $(tree-share)/locale/$i/LC_MESSAGES && \
171                 cd $(tree-share)/locale/$i/LC_MESSAGES && \
172                 ln -sf ../../../../../po/$(outconfbase)/$i.mo lilypond.mo) &&) true
173         touch $(tree-share-prefix)/lilypond-force
174
175 $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force
176         -rm -f $(tree-share-prefix)/fonts/otf/* &&  \
177         rm -f $(tree-share-prefix)/fonts/svg/* &&  \
178         rm -f $(tree-share-prefix)/fonts/tfm/* &&  \
179         rm -f $(tree-share-prefix)/fonts/type1/* &&  \
180                 cd $(tree-share-prefix)/fonts/otf && \
181                 ln -s ../../../../../../mf/$(outconfbase)/*.otf .
182         -cd $(tree-share-prefix)/fonts/svg && \
183                 ln -s ../../../../../../mf/$(outconfbase)/*.svg .
184         -cd $(tree-share-prefix)/fonts/tfm && \
185                 ln -s ../../../../../../mf/$(outconfbase)/*.tfm .
186         -cd $(tree-share-prefix)/fonts/type1 && \
187                 ln -s ../../../../../../mf/$(outconfbase)/*.pfa .
188
189 TAGS.make: dummy
190         etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
191
192 $(config_h): config.hh.in
193 #
194 # this is to prevent people from getting
195 # undefined symbols  when we add them to config.h.in,
196 # and they blindly run "cvs update; make".
197 #
198         @echo
199         @echo ' *** $(config_h) is out of date'
200         @echo ' *** Remove it and rerun autogen:'
201         @echo '         rm $(config_h); ./autogen.sh'
202         @echo
203         @false
204
205
206 test-clean:
207         $(MAKE) -C input/regression/ out=test clean
208
209 test:
210 ## no aa-scaling, no PDF
211         $(MAKE) -C input/regression/ out=test  LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps,png $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-test/collated-files.html
212
213 RESULT_DIR=$(top-build-dir)/out/test-results/
214 check: test
215         rm -rf $(RESULT_DIR)
216         mkdir -p $(RESULT_DIR)
217         $(PYTHON) $(buildscript-dir)/output-distance.py --output-dir $(RESULT_DIR) $(CHECK_SOURCE) input/regression/out-test/