release commit
[lilypond.git] / GNUmakefile.in
blob3d35f644cf099697f67becce69bddfc06b74bb1a
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
41 run-reqs: builddir-setup fonts lily
42 web-reqs: run-reqs pfa-fonts
44 doc: run-reqs
45 $(MAKE) -C Documentation
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
54 pfa-fonts:
55 $(MAKE) MAKE_PFA_FILES=1 -C mf
56 (cd $(builddir)/share/lilypond/fonts && \
57 tar czvf ../../../$(outbase)/type1.tar.gz type1/*.pfa type1/fonts.* type1/lilypond.* )
59 webdir = $(prefix)/share/doc/lilypond-$(TOPLEVEL_VERSION)
60 web-install: html-doc
61 $(INSTALL) -d $(webdir)/html
62 tar -C $(webdir)/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 = 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 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
102 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/$@.html input/
103 cd $(builddir) && ls *.html >> $(outdir)/weblist
104 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
106 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
107 ALL-TAGS:
108 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
110 local-WWW:
112 web: local-web
113 html-doc: web
114 index: web
116 local-WWW-clean: top-WWW-clean
118 WWW-clean:
119 $(MAKE) -C Documentation WWW-clean
120 $(MAKE) -C input WWW-clean
122 top-WWW-clean:
123 cd $(builddir) && rm -f $(TOP_HTMLS) lily-[0-9]*.png
124 $(SHELL) $(buildscript-dir)/clean-fonts.sh
126 WWW:
128 default: $(config_h) builddir-setup
130 builddir-setup: $(builddir)/share/lilypond-force
132 PO_FILES = $(wildcard $(srcdir)/po/*.po)
133 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
134 CATALOGS = $(HELP_CATALOGS:lilypond=)
136 $(builddir)/share/lilypond-force:
137 # Preparing LilyPond tree for builddir exec
138 cd $(builddir) && rm -rf share
139 mkdir -p $(builddir)/share/lilypond
140 mkdir -p $(builddir)/share/lilypond/fonts
141 mkdir -p $(builddir)/share/lilypond/tex
142 cd $(builddir)/share/lilypond && \
143 ln -s $(abs-srcdir)/ly ly && \
144 ln -s ../../mf/$(outconfbase) dvips && \
145 ln -s ../../mf/$(outconfbase) afm && \
146 ln -s ../../mf/$(outconfbase) tfm && \
147 ln -s $(abs-srcdir)/mf && \
148 ln -s $(abs-srcdir)/ps && \
149 ln -s ../../python/$(outconfbase) python && \
150 ln -s $(abs-srcdir)/scm
151 cd $(builddir)/share/lilypond/tex && \
152 ln -s $(abs-srcdir)/tex source && \
153 ln -s ../../../mf/$(outconfbase) generate
154 cd $(builddir)/share/lilypond/fonts && \
155 ln -s $(abs-srcdir)/mf source && \
156 ln -s ../../../mf/$(outconfbase) afm && \
157 ln -s ../../../mf/$(outconfbase) tfm && \
158 ln -s ../../../mf/$(outconfbase) type1
159 $(foreach i,$(CATALOGS), \
160 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
161 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
162 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
163 touch $@
165 local-clean: builddir-setup-clean
166 builddir-setup-clean:
167 cd $(builddir) && rm -rf share
169 $(config_h): configure.in aclocal.m4
171 # this is to prevent people from getting
172 # undefined symbols when we add them to config.h.in,
173 # and they blindly run "cvs update; make".
175 @echo
176 @echo ' *** config.h is out of date'
177 @echo ' *** Remove it and rerun autogen:'
178 @echo ' rm config.h; ./autogen.sh'
179 @echo
180 @false
182 rsync-web:
183 cd $(outdir) ; mkdir web ; tar -xzf web.tar.gz -C web
184 cd $(outdir)/web ; rsync --delete --stats --progress -lavu -e ssh . x:/var/www/lilypond/doc/v1.6/