2 # title specific top level makefile for LilyPond
9 # descent order into subdirectories
11 SUBDIRS = buildscripts python scripts \
16 cygwin debian stepmake \
22 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
24 SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh
25 README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS
26 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
27 IN_FILES := $(wildcard *.in)
28 PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
29 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
30 $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
31 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
32 INSTALLATION_DIR=$(local_lilypond_datadir)
33 INSTALLATION_FILES=$(config_make) VERSION
37 STEPMAKE_TEMPLATES=toplevel po install
38 include $(depth)/make/stepmake.make
41 $(MAKE) -C Documentation
44 -$(INSTALL) -m 755 -d $(webdir)
45 tar -C $(webdir)/ -xzf $(outdir)/web.tar.gz
46 # install-WWW does not recurse; fake it visiting Documentation/user manually
47 $(MAKE) -C Documentation/user local-install-WWW
50 $(MAKE) out=www install-WWW
56 $(MAKE) out=www uninstall-WWW=
59 $(INSTALL) -d $(local_lilypond_datadir)
63 @echo " *** Before running, buildscripts/out/lilypond-{profile,login}"
64 @echo " *** must be run. You're advised to source these scripts from your "
65 @echo " *** login scripts. For more information, see Invoking LilyPond in the manual."
68 web-ext = gz html midi pdf png txt ly
70 footify = $(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION)
71 footifymail = MAILADDRESS=bug-lilypond@gnu.org
74 $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
75 cd $(builddir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
76 cd $(builddir) && find . -name \*.html~ -print | xargs rm -f
77 cd $(builddir) && find Documentation input \
78 $(web-ext:%=-path '*/out-www/*.%' -or) -false \
80 echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
81 echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
82 cd $(builddir) && ls *.html >> $(outdir)/weblist
83 cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
86 src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
90 $(MAKE) $(builddir)/share/lilypond-force
92 default: $(config_h) builddir-setup
94 builddir-setup: $(builddir)/share/lilypond-force
96 PO_FILES = $(wildcard $(srcdir)/po/*.po)
97 HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
98 CATALOGS = $(HELP_CATALOGS:lilypond=)
100 $(builddir)/share/lilypond-force:
101 # Preparing LilyPond tree for builddir exec
102 cd $(builddir) && rm -rf lib share
103 mkdir -p $(builddir)/lib/$(package)
104 mkdir -p $(builddir)/share/$(package)
105 mkdir -p $(builddir)/share/$(package)/elisp
106 mkdir -p $(builddir)/share/$(package)/fonts
107 mkdir -p $(builddir)/share/$(package)/tex
108 cd $(builddir)/lib/$(package) && \
109 ln -s ../../python/$(outconfbase) python
110 cd $(builddir)/share/$(package) && \
111 ln -s $(abs-srcdir)/ly ly && \
112 ln -s ../../mf/$(outconfbase) dvips && \
113 ln -s ../../mf/$(outconfbase) afm && \
114 ln -s ../../mf/$(outconfbase) tfm && \
115 ln -s $(abs-srcdir)/mf && \
116 ln -s $(abs-srcdir)/ps && \
117 ln -s ../../python/$(outconfbase) python && \
118 ln -s $(abs-srcdir)/scm
119 cd $(builddir)/share/$(package)/tex && \
120 ln -s $(abs-srcdir)/tex source && \
121 ln -s ../../../tex/$(outconfbase) tex-out && \
122 ln -s ../../../mf/$(outconfbase) mf-out
123 cd $(builddir)/share/$(package)/fonts && \
124 ln -s $(abs-srcdir)/mf source && \
125 ln -s ../../../mf/$(outconfbase) afm && \
126 ln -s ../../../mf/$(outconfbase) tfm && \
127 ln -s ../../../mf/$(outconfbase) type1
128 cd $(builddir)/share/$(package)/elisp && \
129 ln -sf ../../../elisp/$(outconfbase)/lilypond-words.el . && \
130 ln -s $(abs-srcdir)/elisp/*.el .
131 $(foreach i,$(CATALOGS), \
132 mkdir -p $(builddir)/share/locale/$i/LC_MESSAGES && \
133 cd $(builddir)/share/locale/$i/LC_MESSAGES && \
134 ln -fs ../../../../po/$(outconfbase)/$i.mo lilypond.mo &&) true
137 local-clean: builddir-setup-clean
138 builddir-setup-clean:
139 cd $(builddir) && rm -rf share
141 $(config_h): config.hh.in
143 # this is to prevent people from getting
144 # undefined symbols when we add them to config.h.in,
145 # and they blindly run "cvs update; make".
148 @echo ' *** $(config_h) is out of date'
149 @echo ' *** Remove it and rerun autogen:'
150 @echo ' rm $(config_h); ./autogen.sh'