(Introduction): rewrite
[lilypond.git] / GNUmakefile.in
blob85d27df2dd7a6760f5ee194e4adce1850b388536
1 # -*-Makefile-*-
2 # title specific top level makefile for LilyPond
4 # subdir level:
6 depth = .
9 # descent order into subdirectories
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
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
28 # bootstrap stepmake:
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make
34 footify:
35 $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
36 $(footify-all-command)
38 fonts:
39 $(MAKE) -C $(depth)/mf
41 run-reqs: builddir-setup fonts lily
42 web-reqs: run-reqs pfa-fonts
44 doc: run-reqs
45 $(MAKE) -C Documentation
47 pfa-fonts:
48 $(MAKE) MAKE_PFA_FILES=1 -C mf
49 (cd $(builddir)/share/lilypond/fonts && \
50 tar czvf ../../../$(outbase)/type1.tar.gz type1/*.pfa type1/fonts.* type1/lilypond.* )
52 install-html-doc: top-web
53 $(INSTALL) -m 755 -d $(local_package_docdir)
54 tar -C $(local_package_docdir)/ -xzf $(outdir)/web.tar.gz
56 local-install:
57 $(INSTALL) -d $(local_lilypond_datadir)
59 final-install:
60 @echo
61 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
62 @echo " *** must be run. You're advised to source these scripts from your "
63 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
64 @echo
66 TOP_HTMLS = index.html examples.html
68 examples: web-reqs
69 $(MAKE) out=www -C input WWW
70 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
72 lily: lily/$(outdir)/lilypond
74 lily/$(outdir)/lilypond:
75 $(MAKE) -C lily
77 topdocs-web:
78 $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C Documentation/topdocs WWW
79 $(MAKE) footify
81 local-web: topdocs-web $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
84 web-ext = gz html midi pdf png txt ly
85 top-web:
86 cd $(builddir) && rm -f `find . -name \*.html~ -print`
87 cd $(builddir) && find Documentation input \
88 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
89 > $(outdir)/weblist
90 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
91 cd $(builddir) && ls *.png *.html >> $(outdir)/weblist
92 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
94 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
95 ALL-TAGS:
96 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
98 local-WWW:
100 web: local-web
101 html-doc: web
102 index: web
104 local-WWW-clean: top-WWW-clean
106 WWW-clean:
107 $(MAKE) -C Documentation WWW-clean
108 $(MAKE) -C input WWW-clean
110 top-WWW-clean:
111 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
112 $(SHELL) $(buildscript-dir)/clean-fonts.sh
114 WWW:
116 default: $(config_h) builddir-setup
118 builddir-setup: $(builddir)/share/lilypond-force
120 PO_FILES = $(wildcard $(srcdir)/po/*.po)
121 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
122 CATALOGS = $(HELP_CATALOGS:lilypond=)
124 $(builddir)/share/lilypond-force:
125 # Preparing LilyPond tree for builddir exec
126 cd $(builddir) && rm -rf lib share
127 mkdir -p $(builddir)/lib/lilypond
128 mkdir -p $(builddir)/share/lilypond
129 mkdir -p $(builddir)/share/lilypond/fonts
130 mkdir -p $(builddir)/share/lilypond/tex
131 cd $(builddir)/lib/lilypond && \
132 ln -s ../../python/$(outconfbase) python
133 cd $(builddir)/share/lilypond && \
134 ln -s $(abs-srcdir)/ly ly && \
135 ln -s ../../mf/$(outconfbase) dvips && \
136 ln -s ../../mf/$(outconfbase) afm && \
137 ln -s ../../mf/$(outconfbase) tfm && \
138 ln -s $(abs-srcdir)/mf && \
139 ln -s $(abs-srcdir)/ps && \
140 ln -s ../../python/$(outconfbase) python && \
141 ln -s $(abs-srcdir)/scm
142 cd $(builddir)/share/lilypond/tex && \
143 ln -s $(abs-srcdir)/tex source && \
144 ln -s ../../../mf/$(outconfbase) generate
145 cd $(builddir)/share/lilypond/fonts && \
146 ln -s $(abs-srcdir)/mf source && \
147 ln -s ../../../mf/$(outconfbase) afm && \
148 ln -s ../../../mf/$(outconfbase) tfm && \
149 ln -s ../../../mf/$(outconfbase) type1
150 $(foreach i,$(CATALOGS), \
151 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
152 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
153 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
154 touch $@
156 local-clean: builddir-setup-clean
157 builddir-setup-clean:
158 cd $(builddir) && rm -rf share
160 $(config_h): configure.in aclocal.m4
162 # this is to prevent people from getting
163 # undefined symbols when we add them to config.h.in,
164 # and they blindly run "cvs update; make".
166 @echo
167 @echo ' *** $(config_h) is out of date'
168 @echo ' *** Remove it and rerun autogen:'
169 @echo ' rm $(config_h); ./autogen.sh'
170 @echo
171 @false