]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* GNUmakefile.in (short-examples):
[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         mutopia 
17 #
18
19 SCRIPTS = configure aclocal.m4 autogen.sh
20 README_FILES =  ChangeLog CHANGES COPYING DEDICATION NEWS README.mandrake ROADMAP
21 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
22 IN_FILES := $(wildcard *.in)
23 EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch darwin.patch .cvsignore
24 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
25 INSTALLATION_DIR=$(datadir)
26 INSTALLATION_FILES=$(configuration) VERSION
27
28 # bootstrap stepmake:
29 #
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make 
32 #
33
34 footify:
35         $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
36         $(footify-all-command)
37
38 fonts:
39         $(MAKE) -C $(depth)/mf
40
41 run-reqs: builddir-setup fonts lily
42 web-reqs: run-reqs pfa-fonts
43
44 doc: run-reqs
45         $(MAKE) -C Documentation
46
47 web-doc: web-reqs
48         $(MAKE) out=www -C Documentation WWW
49         $(MAKE) footify
50
51 pfa-fonts:
52         $(MAKE) MAKE_PFA_FILES=1 -C mf
53
54 docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
55 install-html-doc: html-doc
56         $(INSTALL) -d $(docdir)/html 
57         tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
58
59 # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
60 my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp 
61
62
63 local-install:
64         $(INSTALL) -d $(datadir)
65 ifeq ($(KPATHSEA),0)
66         $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
67 endif
68
69
70 TOP_HTMLS = index.html short-examples.html long-examples.html
71
72 short-examples: web-reqs
73         $(MAKE) out=www -C input WWW
74         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
75
76 long-examples: web-reqs
77         $(MAKE) out=www -C mutopia WWW
78         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html mutopia/
79
80 lily: lily/$(outdir)/lilypond
81
82 lily/$(outdir)/lilypond:
83         $(MAKE) -C lily
84
85 local-web: web-doc $(TOP_HTMLS:%=%) footify do-top-doc top-web
86
87 top-web:
88         cd $(builddir) && rm -f `find . -name \*.html~ -print`
89         cd $(builddir) && find `find Documentation input mutopia -type d -name 'out-www' -print` \
90                 -not -name '*.dvi' -not -name '*ly' -not -name '*.tex' \
91                 -not -name '*.ps' -not -name '*.eps' -not -name '*pk' \
92                 -not -name '*.aux' -not -name '*.cp' -not -name '*.fn' \
93                 -not -name '*.vr' -not -name '*.yp' -not -name '*.ky' \
94                 -not -name '*.pg' -not -name '*.tmp' -not -name '*.toc' \
95                 -not -name '*.fns' -not -name '*.cps' -not -name '*.nexi' \
96                 -not -name '*.texi' -not -name '*.texidoc' -not -name '*.tp' \
97                 -not -name '*.pdfps' -not -name '*.eps.bbox' \
98                 -not -name '*.log' -not -name 'out-www' -not -name '*.dep' \
99                 -print \
100             > $(outdir)/weblist
101         cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
102         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
103
104 #WWW: local-WWW
105
106 web: local-web
107 html-doc: web
108 index: web
109
110 local-WWW-clean: top-WWW-clean
111
112 WWW-clean:
113         $(MAKE) -C Documentation WWW-clean
114         $(MAKE) -C input WWW-clean
115         $(MAKE) -C mutopia WWW-clean
116
117 top-WWW-clean:
118         cd $(depth)/$(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
119         $(SHELL) $(buildscript-dir)/clean-fonts.sh
120
121 WWW:
122
123 default: builddir-setup
124
125 builddir-setup: $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force
126
127 $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
128         # Preparing LilyPond tree for builddir exec
129         @cd $(depth)/$(builddir) && rm -rf share
130         @cd $(depth)/$(builddir) && mkdir -p share/lilypond
131         @cd $(depth)/$(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
132         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
133                 ln -s ../../../$(srcdir)/ly ly && \
134                 ln -s ../../../mf/$(outconfbase) dvips && \
135                 ln -s ../../../mf/$(outconfbase) afm && \
136                 ln -s ../../../mf/$(outconfbase) tfm && \
137                 ln -s ../../../$(srcdir)/mf && \
138                 ln -s ../../../$(srcdir)/ps && \
139                 ln -s ../../../$(srcdir)/scm && \
140                 ln -s ../../../$(srcdir)/tex
141         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION) && \
142                 mkdir fonts
143         @cd $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)/fonts && \
144                 ln -s ../../../../$(srcdir)/mf source && \
145                 ln -s ../../../../mf/$(outconfbase) afm && \
146                 ln -s ../../../../mf/$(outconfbase) tfm && \
147                 ln -s ../../../../mf/$(outconfbase) type1