]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* lily/pango-font.cc: backport: pango-font.cc, completely. This
[lilypond.git] / GNUmakefile.in
1 # -*-Makefile-*-
2 # title    specific top level makefile for LilyPond  
3
4 # subdir level:
5 #
6 depth = .
7 #
8
9 # descent order into subdirectories
10
11 SUBDIRS = buildscripts python scripts \
12         elisp \
13         flower kpath-guile lily \
14         mf ly tex ps scm \
15         po make \
16         cygwin debian stepmake \
17         Documentation input \
18         vim 
19 #
20
21 #include VERSION
22 #package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
23
24 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh Doxyfile
25 README_FILES = ChangeLog  COPYING DEDICATION ROADMAP THANKS HACKING
26 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
27 IN_FILES := $(wildcard *.in)
28 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
29 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
30   $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
31 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
32 INSTALLATION_DIR=$(local_lilypond_datadir)
33 INSTALLATION_FILES=$(config_make) VERSION
34
35 # bootstrap stepmake:
36 #
37 STEPMAKE_TEMPLATES=toplevel po install
38 include $(depth)/make/stepmake.make 
39
40 doc: 
41         $(MAKE) -C Documentation
42
43 install-WWW:
44         -$(INSTALL) -m 755 -d $(DESTDIR)$(webdir)
45         cp -a $(outdir)/web-root/ $(DESTDIR)$(webdir)/
46
47         $(MAKE) -C Documentation/user local-install-WWW
48         $(MAKE) -C Documentation/user install-info
49
50 web-install:
51         $(MAKE) out=www install-WWW
52
53 uninstall-WWW:
54         #TODO
55
56 web-uninstall:
57         $(MAKE) out=www uninstall-WWW=
58
59 local-install:
60         $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)
61
62 final-install:
63         @true
64
65 web-ext = html midi pdf png txt ly
66
67 footify = $(PYTHON) $(step-bindir)/add-html-footer.py  --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
68 footifymail = MAILADDRESS=bug-lilypond@gnu.org
69
70
71 local-WWW-post:
72 # need UTF8 setting in case this is hosted on a website. 
73         echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(outdir)/.htaccess
74         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html ./
75         echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/index.html">' > $(outdir)/index.html
76         echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(outdir)/index.html
77
78         $(FIND) $(builddir) -name '*.html' -print | $(footifymail) xargs $(footify)
79         $(FIND) $(builddir) -name \*.html~ -print | xargs rm -f
80         cd $(builddir) && find Documentation input \
81                 $(web-ext:%=-path '*/out-www/*.%' -or) -type l \
82                 > $(outdir)/weblist
83         ls $(outdir)/*.html >> $(outdir)/weblist
84
85 ## rewrite paths so we lose out-www
86         rm -rf $(outdir)/web-root/
87         mkdir $(outdir)/web-root/
88         cat $(outdir)/weblist | (cd $(builddir); tar -cf-  -T- ) | \
89                 tar -C $(outdir)/web-root/ -xf -  
90         cd $(outdir)/web-root/ &&  \
91                 for a in `find -name out-www`; do \
92                         mv $$a/* $$a/.. ; \
93                         rmdir $$a ; \
94                 done
95
96 share-prefix = $(builddir)/share
97 tree-prefix = $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)
98
99 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
100
101 web-clean:
102         $(MAKE) out=www clean
103         $(MAKE) $(tree-prefix)/lilypond-force
104
105 default: $(config_h) builddir-setup 
106
107 builddir-setup: $(tree-prefix)/lilypond-force
108
109 PO_FILES = $(wildcard $(srcdir)/po/*.po)
110 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
111 CATALOGS = $(HELP_CATALOGS:lilypond=) 
112
113 $(tree-prefix)/lilypond-force link-tree: GNUmakefile
114 # Preparing LilyPond tree for builddir exec
115         cd $(builddir) && rm -rf lib share
116         mkdir -p $(builddir)/lib/$(package)
117         mkdir -p $(tree-prefix)
118         mkdir -p $(tree-prefix)/dvips
119         mkdir -p $(tree-prefix)/elisp
120         mkdir -p $(tree-prefix)/fonts
121         mkdir -p $(tree-prefix)/fonts/otf
122         mkdir -p $(tree-prefix)/fonts/tfm
123         mkdir -p $(tree-prefix)/fonts/type1
124         mkdir -p $(tree-prefix)/fonts/svg
125         mkdir -p $(tree-prefix)/fonts/map
126         mkdir -p $(tree-prefix)/fonts/enc
127         mkdir -p $(tree-prefix)/tex
128         cd $(builddir)/lib && \
129                 ln -s  ../../../python/$(outconfbase) python
130         cd $(tree-prefix) && \
131                 ln -s $(abs-srcdir)/ly ly && \
132                 ln -s $(abs-srcdir)/ps && \
133                 ln -s ../../../python/$(outconfbase) python && \
134                 ln -s $(abs-srcdir)/scm && \
135                 ln -s $(abs-srcdir)/scripts scripts
136         cd $(tree-prefix)/dvips && \
137                 ln -s ./../../mf/$(outconfbase) mf-out && \
138                 ln -s $(abs-srcdir)/ps
139         cd $(tree-prefix)/tex && \
140                 ln -s $(abs-srcdir)/tex source && \
141                 ln -s ../../../../tex/$(outconfbase) tex-out && \
142                 ln -s ../../../../mf/$(outconfbase) mf-out
143         -cd $(tree-prefix)/fonts/otf && \
144                 ln -s ../../../../../mf/$(outconfbase)/*.otf .
145         -cd $(tree-prefix)/fonts/svg && \
146                 ln -s ../../../../../mf/$(outconfbase)/*.svg .
147         -cd $(tree-prefix)/fonts/tfm && \
148                 ln -s ../../../../../mf/$(outconfbase)/*.tfm .
149         -cd $(tree-prefix)/fonts/type1 && \
150                 ln -s ../../../../../mf/$(outconfbase)/*.pfa .
151         cd $(tree-prefix)/fonts && \
152                 ln -s $(abs-srcdir)/mf source && \
153                 true
154         -cd $(tree-prefix)/elisp && \
155                 ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
156                 ln -s $(abs-srcdir)/elisp/*.el .
157         $(foreach i,$(CATALOGS), \
158                 mkdir -p $(share-prefix)/locale/$i/LC_MESSAGES && \
159                 cd $(share-prefix)/locale/$i/LC_MESSAGES && \
160                 ln -sf ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
161 #       touch $@
162         touch $(tree-prefix)/lilypond-force
163
164 local-clean: builddir-setup-clean
165 builddir-setup-clean:
166         cd $(builddir) && rm -rf share
167
168 $(config_h): config.hh.in
169 #
170 # this is to prevent people from getting
171 # undefined symbols  when we add them to config.h.in,
172 # and they blindly run "cvs update; make".
173 #
174         @echo
175         @echo ' *** $(config_h) is out of date'
176         @echo ' *** Remove it and rerun autogen:'
177         @echo '         rm $(config_h); ./autogen.sh'
178         @echo
179         @false