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