]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* VERSION (MY_PATCH_LEVEL): make 1.7.0
[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 scripts flower lily \
12         mf ly tex ps scm \
13         python po make \
14         cygwin debian $(builddir)/stepmake \
15         Documentation input
16 #
17
18 SCRIPTS = configure aclocal.m4 autogen.sh
19 README_FILES =  ChangeLog  COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS
20 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt
21 IN_FILES := $(wildcard *.in)
22 EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh 
23 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
24 INSTALLATION_DIR=$(local_lilypond_datadir)
25 INSTALLATION_FILES=$(configuration) VERSION
26
27 # bootstrap stepmake:
28 #
29 STEPMAKE_TEMPLATES=toplevel po install
30 include $(depth)/make/stepmake.make 
31 #
32
33 footify:
34         $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
35         $(footify-all-command)
36
37 fonts:
38         $(MAKE) -C $(depth)/mf
39
40 run-reqs: builddir-setup fonts lily
41 web-reqs: run-reqs pfa-fonts
42
43 doc: run-reqs
44         $(MAKE) -C Documentation
45
46 web-doc: web-reqs
47         $(MAKE) out=www -C input/regression/ WWW
48         $(MAKE) out=www -C input/template/ WWW
49         $(MAKE) out=www -C input/test/ WWW
50         $(MAKE) out=www -C Documentation WWW
51         $(MAKE) footify
52
53 pfa-fonts:
54         $(MAKE) MAKE_PFA_FILES=1 -C mf
55
56 docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
57 install-html-doc: html-doc
58         $(INSTALL) -d $(docdir)/html 
59         tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
60
61 # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
62 my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp 
63
64
65 local-install:
66         $(INSTALL) -d $(local_lilypond_datadir)
67 ifeq ($(KPATHSEA),0)
68         $(foreach i, 1 2 3 4 5, rm -f $(local_lilypond_datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(local_lilypond_datadir)/tfm.$(i) ; )
69 endif
70
71
72 final-install:
73         @echo
74         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
75         @echo " *** must be run. You're advised to source these scripts from your "
76         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
77         @echo 
78
79 TOP_HTMLS = index.html examples.html
80
81 examples: web-reqs
82         $(MAKE) out=www -C input WWW
83         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
84
85 lily: lily/$(outdir)/lilypond
86
87 lily/$(outdir)/lilypond:
88         $(MAKE) -C lily
89
90 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
91
92 web-ext = gz html midi pdf png txt ly
93 top-web:
94         cd $(builddir) && rm -f `find . -name \*.html~ -print`
95         cd $(builddir) && find Documentation input \
96                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
97                 > $(outdir)/weblist
98         cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
99         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
100
101 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
102 ALL-TAGS:
103         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
104
105 local-WWW:
106
107 web: local-web
108 html-doc: web
109 index: web
110
111 local-WWW-clean: top-WWW-clean
112
113 WWW-clean:
114         $(MAKE) -C Documentation WWW-clean
115         $(MAKE) -C input WWW-clean
116
117 top-WWW-clean:
118         cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
119         $(SHELL) $(buildscript-dir)/clean-fonts.sh
120
121 WWW:
122
123 default: $(config_h) builddir-setup
124
125 builddir-setup: $(builddir)/share/lilypond-force
126
127 $(builddir)/share/lilypond-force:
128 # Preparing LilyPond tree for builddir exec
129         cd $(builddir) && rm -rf share
130         mkdir -p $(builddir)/share/lilypond
131         mkdir -p $(builddir)/share/lilypond/fonts
132         mkdir -p $(builddir)/share/lilypond/tex
133         cd $(builddir)/share/lilypond && \
134                 ln -s $(abs-srcdir)/ly ly && \
135                 ln -s ../../mf/$(outconfbase) dvips && \
136                 ln -s ../../mf/$(outconfbase) afm && \
137                 ln -s ../../mf/$(outconfbase) tfm && \
138                 ln -s $(abs-srcdir)/mf && \
139                 ln -s $(abs-srcdir)/ps && \
140                 ln -s ../../python/$(outconfbase) python && \
141                 ln -s $(abs-srcdir)/scm
142         cd $(builddir)/share/lilypond/tex && \
143                 ln -s $(abs-srcdir)/tex source && \
144                 ln -s ../../../mf/$(outconfbase) generate
145         cd $(builddir)/share/lilypond/fonts && \
146                 ln -s $(abs-srcdir)/mf source && \
147                 ln -s ../../../mf/$(outconfbase) afm && \
148                 ln -s ../../../mf/$(outconfbase) tfm && \
149                 ln -s ../../../mf/$(outconfbase) type1
150         touch $@
151
152 local-clean: builddir-setup-clean
153 builddir-setup-clean:
154         cd $(builddir) && rm -rf share
155
156 $(config_h): configure.in aclocal.m4
157 #
158 # this is to prevent people from getting
159 # undefined symbols  when we add them to config.h.in,
160 # and they blindly run "cvs update; make".
161 #
162         @echo
163         @echo ' *** config.h is out of date'
164         @echo ' *** Remove it and rerun autogen:'
165         @echo '         rm config.h; ./autogen.sh'
166         @echo
167         @false