]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
mutopia move
[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 intl \
14         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
23 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
24 INSTALLATION_DIR=$(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 $(datadir)
64 ifeq ($(KPATHSEA),0)
65         $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
66 endif
67
68
69 TOP_HTMLS = index.html examples.html
70
71 examples: web-reqs
72         $(MAKE) out=www -C input WWW
73         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
74
75 lily: lily/$(outdir)/lilypond
76
77 lily/$(outdir)/lilypond:
78         $(MAKE) -C lily
79
80 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
81
82 web-ext = gz html midi pdf png txt
83 top-web:
84         cd $(builddir) && rm -f `find . -name \*.html~ -print`
85         cd $(builddir) && find Documentation input \
86                 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
87                 > $(outdir)/weblist
88         cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
89         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
90
91 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
92 ALL-TAGS:
93         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
94
95 local-WWW:
96
97 web: local-web
98 html-doc: web
99 index: web
100
101 local-WWW-clean: top-WWW-clean
102
103 WWW-clean:
104         $(MAKE) -C Documentation WWW-clean
105         $(MAKE) -C input WWW-clean
106         $(MAKE) -C mutopia WWW-clean
107
108 top-WWW-clean:
109         cd $(depth)/$(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
110         $(SHELL) $(buildscript-dir)/clean-fonts.sh
111
112 WWW:
113
114 default: builddir-setup
115
116 builddir-setup: $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force
117
118 $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
119         # Preparing LilyPond tree for builddir exec
120         @echo Making $(depth)/$(builddir)/share 
121         @cd $(depth)/$(builddir) && rm -rf share
122         @cd $(depth)/$(builddir) && mkdir -p share/lilypond
123         @cd $(depth)/$(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
124         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
125                 ln -s ../../../$(srcdir)/ly ly && \
126                 ln -s ../../../mf/$(outconfbase) dvips && \
127                 ln -s ../../../mf/$(outconfbase) afm && \
128                 ln -s ../../../mf/$(outconfbase) tfm && \
129                 ln -s ../../../$(srcdir)/mf && \
130                 ln -s ../../../$(srcdir)/ps && \
131                 ln -s ../../../$(srcdir)/scm
132         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
133                 mkdir tex
134         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/tex && \
135                 ln -s ../../../../$(srcdir)/tex source && \
136                 ln -s ../../../../mf/$(outconfbase) generate
137         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
138                 mkdir fonts
139         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \
140                 ln -s ../../../../$(srcdir)/mf source && \
141                 ln -s ../../../../mf/$(outconfbase) afm && \
142                 ln -s ../../../../mf/$(outconfbase) tfm && \
143                 ln -s ../../../../mf/$(outconfbase) type1
144
145 local-clean: builddir-setup-clean
146 builddir-setup-clean:
147         @cd $(depth)/$(builddir) && rm -rf share