(extra_init): add compat2 to latexoptions.
[lilypond.git] / GNUmakefile.in
blobb5c50a2e74f0e6bd7e86a40768dff9e87083d763
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
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
40 (cd $(builddir)/share/lilypond/fonts && \
41 tar czvf ../../../$(outbase)/type1.tar.gz type1/*.pfa type1/fonts.* type1/lilypond.* )
43 run-reqs: builddir-setup fonts lily
44 web-reqs: run-reqs pfa-fonts
46 doc: run-reqs
47 $(MAKE) -C Documentation
49 web-doc: web-reqs
50 $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/regression/ WWW
51 $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/template/ WWW
52 $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C input/test/ WWW
53 $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html -C Documentation WWW
54 $(MAKE) footify
56 pfa-fonts:
57 $(MAKE) MAKE_PFA_FILES=1 -C mf
59 docdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
60 install-html-doc: html-doc
61 $(INSTALL) -d $(docdir)/html
62 tar -C $(docdir)/html -zxf $(outdir)/web.tar.gz
64 # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended
65 my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp
68 local-install:
69 $(INSTALL) -d $(local_lilypond_datadir)
70 ifeq ($(KPATHSEA),0)
71 $(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) ; )
72 endif
75 final-install:
76 @echo
77 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
78 @echo " *** must be run. You're advised to source these scripts from your "
79 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
80 @echo
82 TOP_HTMLS = index.html examples.html
84 examples: web-reqs
85 $(MAKE) out=www -C input WWW
86 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
88 lily: lily/$(outdir)/lilypond
90 lily/$(outdir)/lilypond:
91 $(MAKE) -C lily
93 local-web: web-doc $(TOP_HTMLS:%.html=%) footify do-top-doc top-web
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 -)
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')
109 local-WWW:
111 web: local-web
112 html-doc: web
113 index: web
115 local-WWW-clean: top-WWW-clean
117 WWW-clean:
118 $(MAKE) -C Documentation WWW-clean
119 $(MAKE) -C input WWW-clean
121 top-WWW-clean:
122 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
123 $(SHELL) $(buildscript-dir)/clean-fonts.sh
125 WWW:
127 default: $(config_h) builddir-setup
129 builddir-setup: $(builddir)/share/lilypond-force
131 PO_FILES = $(wildcard $(srcdir)/po/*.po)
132 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
133 CATALOGS = $(HELP_CATALOGS:lilypond=)
135 $(builddir)/share/lilypond-force:
136 # Preparing LilyPond tree for builddir exec
137 cd $(builddir) && rm -rf share
138 mkdir -p $(builddir)/share/lilypond
139 mkdir -p $(builddir)/share/lilypond/fonts
140 mkdir -p $(builddir)/share/lilypond/tex
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 $@
164 local-clean: builddir-setup-clean
165 builddir-setup-clean:
166 cd $(builddir) && rm -rf share
168 $(config_h): configure.in aclocal.m4
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".
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