]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
*** empty log message ***
[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 CHANGES COPYING DEDICATION NEWS README.mandrake ROADMAP
20 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.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 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 Documentation WWW
48         $(MAKE) footify
49
50 pfa-fonts:
51         $(MAKE) MAKE_PFA_FILES=1 -C mf
52
53 docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
54 install-html-doc: html-doc
55         $(INSTALL) -d $(docdir)/html 
56         tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
57
58 # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
59 my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp 
60
61
62 local-install:
63         $(INSTALL) -d $(local_lilypond_datadir)
64 ifeq ($(KPATHSEA),0)
65         $(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) ; )
66 endif
67
68
69 final-install:
70         @echo
71         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
72         @echo " *** must be run. You're advised to source these scripts from your "
73         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
74         @echo 
75
76 TOP_HTMLS = index.html examples.html
77
78 examples: web-reqs
79         $(MAKE) out=www -C input WWW
80         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
81
82 lily: lily/$(outdir)/lilypond
83
84 lily/$(outdir)/lilypond:
85         $(MAKE) -C lily
86
87 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
88
89 web-ext = gz html midi pdf png txt
90 top-web:
91         cd $(builddir) && rm -f `find . -name \*.html~ -print`
92         cd $(builddir) && find Documentation input \
93                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
94                 > $(outdir)/weblist
95         cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
96         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
97
98 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
99 ALL-TAGS:
100         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
101
102 local-WWW:
103
104 web: local-web
105 html-doc: web
106 index: web
107
108 local-WWW-clean: top-WWW-clean
109
110 WWW-clean:
111         $(MAKE) -C Documentation WWW-clean
112         $(MAKE) -C input WWW-clean
113
114 top-WWW-clean:
115         cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
116         $(SHELL) $(buildscript-dir)/clean-fonts.sh
117
118 WWW:
119
120 default: $(config_h) builddir-setup
121
122 builddir-setup: $(builddir)/share/lilypond-force
123
124 $(builddir)/share/lilypond-force:
125 # Preparing LilyPond tree for builddir exec
126         @echo Making $(builddir)/share 
127         @cd $(builddir) && rm -rf share
128         @mkdir -p $(builddir)/share/lilypond
129         @mkdir -p $(builddir)/share/lilypond/fonts
130         @mkdir -p $(builddir)/share/lilypond/tex
131         @cd $(builddir)/share/lilypond && \
132                 ln -s $(abs-srcdir)/ly ly && \
133                 ln -s ../../mf/$(outconfbase) dvips && \
134                 ln -s ../../mf/$(outconfbase) afm && \
135                 ln -s ../../mf/$(outconfbase) tfm && \
136                 ln -s $(abs-srcdir)/mf && \
137                 ln -s $(abs-srcdir)/ps && \
138                 ln -s $(abs-srcdir)/scm
139         @cd $(builddir)/share/lilypond/tex && \
140                 ln -s $(abs-srcdir)/tex source && \
141                 ln -s ../../../mf/$(outconfbase) generate
142         @cd $(builddir)/share/lilypond/fonts && \
143                 ln -s $(abs-srcdir)/mf source && \
144                 ln -s ../../../mf/$(outconfbase) afm && \
145                 ln -s ../../../mf/$(outconfbase) tfm && \
146                 ln -s ../../../mf/$(outconfbase) type1
147
148 local-clean: builddir-setup-clean
149 builddir-setup-clean:
150         @cd $(builddir) && rm -rf share
151
152 $(config_h): configure.in aclocal.m4
153 #
154 # this is to prevent people from getting
155 # undefined symbols  when we add them to config.h.in,
156 # and they blindly run "cvs update; make".
157 #
158         @echo
159         @echo ' *** config.h is out of date'
160         @echo ' *** Remove it and rerun autogen:'
161         @echo '         rm config.h; ./autogen.sh'
162         @echo
163         @false