]> git.donarmstrong.com Git - lilypond.git/blob - GNUmakefile.in
* stepmake/stepmake/omf-targets.make (local-install): add
[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         flower lily \
13         mf ly tex ps scm \
14         po make \
15         cygwin debian $(builddir)/stepmake \
16         Documentation input
17 #
18
19 SCRIPTS = configure aclocal.m4 autogen.sh
20 README_FILES =  ChangeLog  COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS
21 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.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 server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh  lilypond.words
24 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
25 INSTALLATION_DIR=$(local_lilypond_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 LILYPOND_BOOK_FORMAT=texi-html -C input/regression/ WWW
49         $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/template/ WWW
50         $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/test/ WWW
51         $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C Documentation WWW
52         $(MAKE) footify
53
54 pfa-fonts:
55         $(MAKE) MAKE_PFA_FILES=1 -C mf
56
57 install-html-doc: web-doc top-web
58         $(INSTALL) -m 755 -d $(local_package_docdir) 
59         tar -C $(local_package_docdir)/ -xzf $(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 local-install:
65         $(INSTALL) -d $(local_lilypond_datadir)
66 ifeq ($(KPATHSEA),0)
67         $(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) ; )
68 endif
69
70
71 final-install:
72         @echo
73         @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
74         @echo " *** must be run. You're advised to source these scripts from your "
75         @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
76         @echo 
77
78 TOP_HTMLS = index.html examples.html
79
80 examples: web-reqs
81         $(MAKE) out=www -C input WWW
82         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
83
84 lily: lily/$(outdir)/lilypond
85
86 lily/$(outdir)/lilypond:
87         $(MAKE) -C lily
88
89 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
90
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         $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
99         cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
100         cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz  -T -)
101
102 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
103 ALL-TAGS:
104         etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
105
106 local-WWW:
107
108 web: local-web
109 html-doc: web
110 index: web
111
112 local-WWW-clean: top-WWW-clean
113
114 WWW-clean:
115         $(MAKE) -C Documentation WWW-clean
116         $(MAKE) -C input WWW-clean
117
118 top-WWW-clean:
119         cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
120         $(SHELL) $(buildscript-dir)/clean-fonts.sh
121
122 WWW:
123
124 default: $(config_h) builddir-setup
125
126 builddir-setup: $(builddir)/share/lilypond-force
127
128 PO_FILES = $(wildcard $(srcdir)/po/*.po)
129 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
130 CATALOGS = $(HELP_CATALOGS:lilypond=) 
131
132 $(builddir)/share/lilypond-force:
133 # Preparing LilyPond tree for builddir exec
134         cd $(builddir) && rm -rf lib share
135         mkdir -p $(builddir)/lib/lilypond
136         mkdir -p $(builddir)/share/lilypond
137         mkdir -p $(builddir)/share/lilypond/fonts
138         mkdir -p $(builddir)/share/lilypond/tex
139         cd $(builddir)/lib/lilypond && \
140                 ln -s  ../../python/$(outconfbase) python
141         cd $(builddir)/share/lilypond && \
142                 ln -s $(abs-srcdir)/ly ly && \
143                 ln -s ../../mf/$(outconfbase) dvips && \
144                 ln -s ../../mf/$(outconfbase) afm && \
145                 ln -s ../../mf/$(outconfbase) tfm && \
146                 ln -s $(abs-srcdir)/mf && \
147                 ln -s $(abs-srcdir)/ps && \
148                 ln -s ../../python/$(outconfbase) python && \
149                 ln -s $(abs-srcdir)/scm
150         cd $(builddir)/share/lilypond/tex && \
151                 ln -s $(abs-srcdir)/tex source && \
152                 ln -s ../../../mf/$(outconfbase) generate
153         cd $(builddir)/share/lilypond/fonts && \
154                 ln -s $(abs-srcdir)/mf source && \
155                 ln -s ../../../mf/$(outconfbase) afm && \
156                 ln -s ../../../mf/$(outconfbase) tfm && \
157                 ln -s ../../../mf/$(outconfbase) type1
158         $(foreach i,$(CATALOGS), \
159                 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
160                 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
161                 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
162         touch $@
163
164 local-clean: builddir-setup-clean
165 builddir-setup-clean:
166         cd $(builddir) && rm -rf share
167
168 $(config_h): configure.in aclocal.m4
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