2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
15 cygwin debian stepmake \
19 SCRIPTS = configure aclocal.m4 autogen.sh
20 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS
21 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
22 IN_FILES := $(wildcard *.in)
23 EXTRA_DIST_FILES = $(wildcard *.el) VERSION lilypond.vim vimrc $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.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=$(config_make) VERSION
30 STEPMAKE_TEMPLATES=toplevel po install
31 include $(depth)/make/stepmake.make
34 $(MAKE) -C Documentation
36 LILYPOND_WORDS = $(outdir)/lilypond.words.el $(outdir)/lilypond.words.vim
37 $(LILYPOND_WORDS): $(srcdir)/lily/my-lily-lexer.cc $(buildscript-dir)/lilypond.words.py $(srcdir)/scm/new-markup.scm $(srcdir)/ly/engraver-init.ly
38 cd $(builddir) && $(PYTHON) $(buildscript-dir)/lilypond.words.py $(outdir)
40 all: $(LILYPOND_WORDS)
43 -$(INSTALL) -m 755 -d $(webdir)
44 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
47 $(INSTALL) -d $(local_lilypond_datadir)
51 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
52 @echo " *** must be run. You're advised to source these scripts from your "
53 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
56 web-ext = gz html midi pdf png txt ly
58 footify = MAILADDRESS=bug-lilypond@gnu.org $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
61 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
64 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
65 cd $(builddir) && $(footify) `$(FIND) . -name '*.html' -print`
66 cd $(builddir) && rm -f `find . -name \*.html~ -print`
67 cd $(builddir) && find Documentation input \
68 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
70 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
71 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
72 cd $(builddir) && ls *.html >> $(outdir)/weblist
73 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
76 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
79 etags $(shell find . $(src-ext:%=-name '*.%' -or) -false | grep -v '/out')
82 $(SHELL) $(buildscript-dir)/clean-fonts.sh
84 $(MAKE) $(builddir)/share/lilypond-force
87 default: $(config_h) builddir-setup
89 builddir-setup: $(builddir)/share/lilypond-force
91 PO_FILES = $(wildcard $(srcdir)/po/*.po)
92 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
93 CATALOGS = $(HELP_CATALOGS:lilypond=)
95 $(builddir)/share/lilypond-force:
96 # Preparing LilyPond tree for builddir exec
97 cd $(builddir) && rm -rf lib share
98 mkdir -p $(builddir)/lib/lilypond
99 mkdir -p $(builddir)/share/lilypond
100 mkdir -p $(builddir)/share/lilypond/elisp
101 mkdir -p $(builddir)/share/lilypond/fonts
102 mkdir -p $(builddir)/share/lilypond/tex
103 cd $(builddir)/lib/lilypond && \
104 ln -s ../../python/$(outconfbase) python
105 cd $(builddir)/share/lilypond && \
106 ln -s $(abs-srcdir)/ly ly && \
107 ln -s ../../mf/$(outconfbase) dvips && \
108 ln -s ../../mf/$(outconfbase) afm && \
109 ln -s ../../mf/$(outconfbase) tfm && \
110 ln -s $(abs-srcdir)/mf && \
111 ln -s $(abs-srcdir)/ps && \
112 ln -s ../../python/$(outconfbase) python && \
113 ln -s $(abs-srcdir)/scm
114 cd $(builddir)/share/lilypond/tex && \
115 ln -s $(abs-srcdir)/tex source && \
116 ln -s ../../../mf/$(outconfbase) generate
117 cd $(builddir)/share/lilypond/fonts && \
118 ln -s $(abs-srcdir)/mf source && \
119 ln -s ../../../mf/$(outconfbase) afm && \
120 ln -s ../../../mf/$(outconfbase) tfm && \
121 ln -s ../../../mf/$(outconfbase) type1
122 cd $(builddir)/share/lilypond/elisp && \
123 ln -sf ../../../$(outconfbase)/lilypond.words.el . && \
124 ln -s $(abs-srcdir)/*.el .
125 $(foreach i,$(CATALOGS), \
126 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
127 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
128 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
131 local-clean: builddir-setup-clean
132 builddir-setup-clean:
133 cd $(builddir) && rm -rf share
135 $(config_h): config.hh.in
137 # this is to prevent people from getting
138 # undefined symbols when we add them to config.h.in,
139 # and they blindly run "cvs update; make".
142 @echo ' *** $(config_h) is out of date'
143 @echo ' *** Remove it and rerun autogen:'
144 @echo ' rm $(config_h); ./autogen.sh'
149 # maybe move into private script?
151 cd out-www && mkdir web && tar -xzf web.tar.gz -C web
153 chgrp -R lilypond . && \
155 chmod 2775 `find -type d` . && \
156 rsync --delete --stats --progress -gorltvu -e ssh . x:/var/www/lilypond/doc/v1.9/
157 cd out-www && rm -rf web/