release commit
[lilypond.git] / GNUmakefile.in
blob5b2716a8e8ca9c4046ac2a3aadf12f57a31d5a4e
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 elisp \
13 flower lily \
14 mf ly tex ps scm \
15 po make \
16 cygwin debian stepmake \
17 Documentation input
20 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
21 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS
22 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
23 IN_FILES := $(wildcard *.in)
24 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
25 VIM_FILES = vimrc lilypond.vim
26 EXTRA_DIST_FILES = VERSION .cvsignore $(README_FILES) $(SCRIPTS) $(IN_FILES) \
27 $(PATCH_FILES) $(VIM_FILES)
28 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
29 INSTALLATION_DIR=$(local_lilypond_datadir)
30 INSTALLATION_FILES=$(config_make) VERSION
32 # bootstrap stepmake:
34 STEPMAKE_TEMPLATES=toplevel po install
35 include $(depth)/make/stepmake.make
37 doc:
38 $(MAKE) -C Documentation
40 install-WWW:
41 -$(INSTALL) -m 755 -d $(webdir)
42 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
44 web-install:
45 $(MAKE) out=www install-WWW
47 local-install:
48 $(INSTALL) -d $(local_lilypond_datadir)
50 final-install:
51 @echo
52 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
53 @echo " *** must be run. You're advised to source these scripts from your "
54 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
55 @echo
57 web-ext = gz html midi pdf png txt ly
59 footify = MAILADDRESS=bug-lilypond@gnu.org $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
61 bla:
62 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
64 local-WWW-post:
65 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
66 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
67 cd $(builddir) && rm -f `find . -name \*.html~ -print`
68 cd $(builddir) && find Documentation input \
69 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
70 > $(outdir)/weblist
71 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
72 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
73 cd $(builddir) && ls *.html >> $(outdir)/weblist
74 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
77 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
79 ALL-TAGS:
80 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
82 web-clean:
83 $(SHELL) $(buildscript-dir)/clean-fonts.sh
84 $(MAKE) out=www clean
85 $(MAKE) $(builddir)/share/lilypond-force
88 default: $(config_h) builddir-setup
90 builddir-setup: $(builddir)/share/lilypond-force
92 PO_FILES = $(wildcard $(srcdir)/po/*.po)
93 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
94 CATALOGS = $(HELP_CATALOGS:lilypond=)
96 $(builddir)/share/lilypond-force:
97 # Preparing LilyPond tree for builddir exec
98 cd $(builddir) && rm -rf lib share
99 mkdir -p $(builddir)/lib/lilypond
100 mkdir -p $(builddir)/share/lilypond
101 mkdir -p $(builddir)/share/lilypond/elisp
102 mkdir -p $(builddir)/share/lilypond/fonts
103 mkdir -p $(builddir)/share/lilypond/tex
104 cd $(builddir)/lib/lilypond && \
105 ln -s ../../python/$(outconfbase) python
106 cd $(builddir)/share/lilypond && \
107 ln -s $(abs-srcdir)/ly ly && \
108 ln -s ../../mf/$(outconfbase) dvips && \
109 ln -s ../../mf/$(outconfbase) afm && \
110 ln -s ../../mf/$(outconfbase) tfm && \
111 ln -s $(abs-srcdir)/mf && \
112 ln -s $(abs-srcdir)/ps && \
113 ln -s ../../python/$(outconfbase) python && \
114 ln -s $(abs-srcdir)/scm
115 cd $(builddir)/share/lilypond/tex && \
116 ln -s $(abs-srcdir)/tex source && \
117 ln -s ../../../mf/$(outconfbase) generate
118 cd $(builddir)/share/lilypond/fonts && \
119 ln -s $(abs-srcdir)/mf source && \
120 ln -s ../../../mf/$(outconfbase) afm && \
121 ln -s ../../../mf/$(outconfbase) tfm && \
122 ln -s ../../../mf/$(outconfbase) type1
123 cd $(builddir)/share/lilypond/elisp && \
124 ln -sf ../../../elisp/$(outconfbase)/lilypond.words.el . && \
125 ln -s $(abs-srcdir)/elisp/*.el .
126 $(foreach i,$(CATALOGS), \
127 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
128 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
129 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
130 touch $@
132 local-clean: builddir-setup-clean
133 builddir-setup-clean:
134 cd $(builddir) && rm -rf share
136 $(config_h): config.hh.in
138 # this is to prevent people from getting
139 # undefined symbols when we add them to config.h.in,
140 # and they blindly run "cvs update; make".
142 @echo
143 @echo ' *** $(config_h) is out of date'
144 @echo ' *** Remove it and rerun autogen:'
145 @echo ' rm $(config_h); ./autogen.sh'
146 @echo
147 @false